dart-archive / js_facade_gen

Generates package:js Javascript interop facades for arbitrary TypeScript libraries
Apache License 2.0
161 stars 29 forks source link

Unexpected TypeNode kind: OptionalType #95

Open agilob opened 3 years ago

agilob commented 3 years ago

I'm getting 100s of

❯ dart_js_facade_gen http.d.ts
http.d.ts:299:51: Unexpected TypeNode kind: OptionalType
http.d.ts:299:51: Internal error. Generate null type name.
http.d.ts:299:74: Unexpected TypeNode kind: OptionalType
http.d.ts:299:74: Internal error. Generate null type name.
http.d.ts:299:74: Unexpected TypeNode kind: OptionalType
http.d.ts:299:74: Internal error. Generate null type name.
http.d.ts:299:74: Unexpected TypeNode kind: OptionalType

Line 299 is

export type ArrayBatchRequest = [ string, string, (RequestBody | null)?, (Params | null)? ];

Change to

export type ArrayBatchRequest = [ string, string, RequestBody, Params];

allows transpilation of the file.

trying to convert 0.28.3 of @types/k6

dart_js_facade_gen produces no new files