TypeScript Version: 2.2.2
Code
// typescript code
export class Foo {
constructor(public bar?: string) {
}
}
// generated declaration
export declare class Foo {
bar: string;
constructor(bar?: string);
}
Expected behavior:
Foo.bar should be typed as string | undefined
Actual behavior:
Foo.bar is typed as string
Our declaration is no longer compatible with the source that generated it.
TypeScript Version: 2.2.2
Code
Expected behavior:
Foo.barshould be typed asstring | undefinedActual behavior:
Foo.baris typed asstringOur declaration is no longer compatible with the source that generated it.