Types output - get 'runtime.connect' to return a 'runtime.Port' #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re. issue: #1
I've rewritten the code a fair bit to handle nested interfaces and types, e.g. runtime.Port. Generation and build both run successfully.
I'd now like to test these changes against the following MAC pull request: mozilla/multi-account-containers#1613
What I'd like to do is to remove these lines: https://github.com/mozilla/multi-account-containers/blob/30a2601d35cc0d6aae1e0a681b69a0e6a995c751/test/helper.js#L22-L24
Then, I should be able to build successfully, using my updated version of
webextensions-api-mock
. I tried this by basically copying thedist
dir from my modified version ofwebextensions-api-mock
and overwritingnode_modules/webextensions-api-mock/dist
in my clone ofmulti-account-containers
. But when Irun test
in themulti-account-containers
clone, I get the same error as before - i.e. it doesn't think the return value ofruntime.connect
has any method namedpostMessage
. But my updates towebextensions-api-mock
should have meant thatruntime.connect
now returns aRuntimePort
. Any ideas why this isn't working?I also noticed that
webextensions-api-mock/dist/generated/types.js
is always an empty file. Maybe it should contain all of the compiled types fromwebextensions-api-mock/dist/generated/types.d.ts
?