js_facade_gen icon indicating copy to clipboard operation
js_facade_gen copied to clipboard

Promise<unknown> and other things

Open ghost opened this issue 5 years ago • 7 comments

Hi I have a .d.ts file containing Promise<unknown> and it fails but when I change the code to Promise<any> it's ok

I'm trying to understand why so I found that unknown was introduced in typescript 3. So my question is, is js_facade_gen compatible only with ts 2 or I else I need to change a config somewhere?

ghost avatar Feb 24 '20 06:02 ghost

re-exports must have a module URL (export x from "./y")

is a common occurence

ghost avatar Feb 24 '20 11:02 ghost

export {};

ghost avatar Feb 25 '20 15:02 ghost

object

ghost avatar Feb 25 '20 15:02 ghost

export default

ghost avatar Feb 25 '20 16:02 ghost

Promise fails

ghost avatar Feb 29 '20 20:02 ghost

are enum like this parsed correctly:

export enum Direction {
    Inbound = "inbound",
    Outbound = "outbound"
}

export declare enum VertoMethod {
    Invite = "verto.invite",
    Attach = "verto.attach",
    Answer = "verto.answer",
    Info = "verto.info",
    Display = "verto.display",
    Media = "verto.media",
    Event = "verto.event",
    Bye = "verto.bye",
    Punt = "verto.punt",
    Broadcast = "verto.broadcast",
    Subscribe = "verto.subscribe",
    Unsubscribe = "verto.unsubscribe",
    ClientReady = "verto.clientReady",
    Modify = "verto.modify"
}

export declare enum State {
    New = 0,
    Requesting = 1,
    Trying = 2,
    Recovering = 3,
    Ringing = 4,
    Answering = 5,
    Early = 6,
    Active = 7,
    Held = 8,
    Hangup = 9,
    Destroy = 10,
    Purge = 11
}

ghost avatar Mar 02 '20 15:03 ghost

@JS()
library a.b.c.d;

gives notice Name libraries using 'lowercase_with_underscores'

ghost avatar Mar 02 '20 20:03 ghost