I have recently updated VS2017 and I am seeing a lot of typescript build errors.
The errors are all the same, and all relate to the validity of d.ts files.
Here is the some code in a d.ts file that is causing a typescript compilation error (TS2411):
interface JQueryAjaxSettings {
}
interface DataSourceTransportCreate extends JQueryAjaxSettings {
cache?: boolean;
contentType?: string;
data?: any;
dataType?: string;
type?: string;
url?: any;
}
interface DataSourceTransport {
create?: DataSourceTransportCreate;
destroy?: DataSourceTransportDestroy;
push?: Function;
read?: DataSourceTransportRead;
signalr?: DataSourceTransportSignalr;
update?: DataSourceTransportUpdate;
parameterMap?(data: DataSourceTransportParameterMapData, type: string): any;
}
interface DataSourceTransportOptions {
success: (data?: any) => void;
error: (error?: any) => void;
data: any;
}
interface DataSourceTransportWithFunctionOperations extends DataSourceTransport {
create?: (options: DataSourceTransportOptions) => void;
destroy?: (options: DataSourceTransportOptions) => void;
read?: (options: DataSourceTransportReadOptions) => void;
update?: (options: DataSourceTransportOptions) => void;
}
The error is:
TS2430 (TS) Interface 'DataSourceTransportWithFunctionOperations' incorrectly extends interface 'DataSourceTransport'. Types of property 'create' are incompatible. Type '(options: DataSourceTransportOptions) => void' has no properties in common with type 'DataSourceTransportCreate'. Scripts (tsconfig project) C:\Users****\typings\kendo\kendo.all.d.ts 1202 Active "
This error is repeated for a whole host of other properties.
My question is - is this definition valid? Has there been some change that would cause this to suddenly become invalid (i.e shown as a build error in VS)?