typescript-go
typescript-go copied to clipboard
d.ts content different with tsc
with below code:
export class X {
static readonly ID = 'XXX';
}
generated d.ts file with below different:
- tsc
export declare class X {
static readonly ID = 'XXX';
}
- tsgo
export declare class X {
static readonly ID: string;
}
version: @typescript/[email protected]
export class HistoryNavigator<T> implements INavigator<T> {
private _limit: number;
private _navigator!: ArrayNavigator<T>;
constructor(
private _history: IHistory<T> = new Set(),
limit: number = 10,
) {
this._limit = limit;
this._onChange();
if (this._history.onDidChange) {
this._history.onDidChange(() => this._onChange());
}
}
}
the d.ts diff is ( tsc vs tsgo ):
< private _navigator;
< constructor(_history?: IHistory<T>, limit?: number);
---
> private _navigator!;
> constructor(_history?: IHistory<T> | undefined, limit?: number);
seems like tsgo will add | undefined when the argument is optional.
any update?