js_facade_gen icon indicating copy to clipboard operation
js_facade_gen copied to clipboard

Unable to generate interop for ts-ebml

Open creativecreatorormaybenot opened this issue 5 years ago • 0 comments

I am trying to generate an interop for ts-ebml, however, the package fails:

dart_js_facade_gen --destination . --base-path ts-ebml-master\lib ts-ebml-master\lib\index.d.ts ts-ebml-master\lib\cli.d.ts ts-ebml-master\lib\EBML.d.ts ts-ebml-master\lib\EBMLDecoder.d.ts ts-ebml-master\lib\EBMLEncoder.d.ts ts-ebml-master\lib\EBMLReader.d.ts ts-ebml-master\lib\tools.d.ts

I am using the latest master you can find here: https://github.com/legokichi/ts-ebml/tree/master/lib

Errors

There are multiple errors:

Click to expand details
Transpiling [
  'ts-ebml-master\\lib\\index.d.ts',
  'ts-ebml-master\\lib\\cli.d.ts',
  'ts-ebml-master\\lib\\EBML.d.ts',
  'ts-ebml-master\\lib\\EBMLDecoder.d.ts',
  'ts-ebml-master\\lib\\EBMLEncoder.d.ts',
  'ts-ebml-master\\lib\\EBMLReader.d.ts',
  'ts-ebml-master\\lib\\tools.d.ts'
] to .
ts-ebml-master/lib/index.d.ts:7:1: re-exports must have a module URL (export x from "./y").
ts-ebml-master/lib/index.d.ts:7:10: no type declarations for symbol version
ts-ebml-master/lib/index.d.ts:7:45: no type declarations for symbol "ts-ebml-master/lib/tools"
ts-ebml-master/lib/index.d.ts:1:1: Could not format because the source could not be parsed:

line 6, column 37: Directives must appear before any declarations.
  ╷
6 │  @JS() external String get version; export show version, EBMLDecoder, EBMLEncoder, EBMLReader, tools ;
  │                                     ^^^^^^
  ╵
line 6, column 44: Expected a string literal.
  ╷
6 │  @JS() external String get version; export show version, EBMLDecoder, EBMLEncoder, EBMLReader, tools ;
  │                                            ^^^^
  ╵

I tried to fix some of the stuff, but I have no idea how to fix the version export for example or I do not even know what the error for line 7 is trying to tell me.


Am I using the tool wrong, does the tool lack features, or is the ts-ebml library out-of-date? And how do I go about fixing this if the command is correct?