refactor(ts): improve typescript types#309
refactor(ts): improve typescript types#309JustinBeckwith merged 1 commit intogoogleapis:masterfrom JustinBeckwith:ts3
Conversation
Codecov Report
@@ Coverage Diff @@
## master #309 +/- ##
=========================================
Coverage ? 89.96%
=========================================
Files ? 14
Lines ? 658
Branches ? 75
=========================================
Hits ? 592
Misses ? 36
Partials ? 30
Continue to review full report at Codecov.
|
|
ok @ofrobots ready for another look :) |
ofrobots
left a comment
There was a problem hiding this comment.
I need to finish this off when I have some more time.. I did add some comments already that are actionable.
The other thing is that once this lands, we need to ship the generated logging.d.ts. We are exporting interface types from it. We shouldn't need to ship logging.js as long as we are only referencing the interface rather than concrete types.
|
@ofrobots one more time 😆 |
|
The |
ofrobots
left a comment
There was a problem hiding this comment.
Still looking.. but have some comments...
ofrobots
left a comment
There was a problem hiding this comment.
Looking great. Some more things to address:
So, at this point we don't need use proto/logging.js at runtime, and we don't need to ship it (it is rather large).
Can you drop that file from this PR? You will have to replace the imports of proto/logging to imports of proto/logging.d.
|
@ofrobots oooook. One more time. |
|
@JustinBeckwith can you address these:
|
|
@ofrobots done 🎉 |
|
Awesome. May I suggest this way of doing it instead: -"proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files -o proto/logging.js google/logging/v2/logging.proto && pbts -o proto/logging.d.ts proto/logging.js"
+"proto:logging": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/logging/v2/logging.proto | pbts -o proto/logging.d.ts -" |
ofrobots
left a comment
There was a problem hiding this comment.
LGTM once comment addressed
No description provided.