I have an interface that is supposed to have a function signature of:
(param: {prop: boolean}): any
but I forget the parameter name (I'm not sure if this signature is considered valid):
When compiling this invalid interface with the --declaration flag, an invalid .d.ts file results:
/* foo.ts */
export interface SomeInterface {
({prop: boolean}): any
}
tsc foo.ts --module commonjs --declaration
/* foo.d.ts */
export interface SomeInterface {
({prop: }: {
prop: any;
}): any;
}
If parameter names are optional, this should produce a valid .d.ts file. If parameter names are required, tsc should throw an error, or at least warn me that there is an issue.
I have an interface that is supposed to have a function signature of:
but I forget the parameter name (I'm not sure if this signature is considered valid):
When compiling this invalid interface with the
--declarationflag, an invalid.d.tsfile results:tsc foo.ts --module commonjs --declarationIf parameter names are optional, this should produce a valid
.d.tsfile. If parameter names are required,tscshould throw an error, or at least warn me that there is an issue.