Parsing interface with `new` in it
Closed this issue · 2 comments
BrooklynKing commented
interface IPlaybackAdapterClass {
new (eventEmitter: IEventEmitter): IPlaybackAdapter;
isSupported(): boolean;
}
when okidoc trying to parse this construction with babylon(?), it fails with exception
An error occurred while building documentation. { SyntaxError: "Player public methods" documentation source (src/core/default-modules.ts) - Unexpected token (82:2)
80 | interface IPlaybackAdapterClass {
81 | new (eventEmitter: IEventEmitter): IPlaybackAdapter
> 82 | isSupported(): boolean;
| ^
83 | }
84 |
85 | /**
as you can see, there is no ;
after line with new
. Right now i'm just putting this line as last in interface declaration, so it's not critical for me.
bodia-uz commented
Thanks for reporting. Will look into it
skyiea commented
Pending resolution of babel/babel#10258
Then we'll need to update @babel/generator
in okidoc-md/package.json
.