-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSpecIssues related to the TypeScript language specificationIssues related to the TypeScript language specification
Milestone
Description
interface IBookStyle {
initialLeftPageTransforms?: (width: number) => NamedTransform[];
}
interface NamedTransform {
[name: string]: Transform3D;
}
interface Transform3D {
cachedCss: string;
}
var style: IBookStyle = {
initialLeftPageTransforms: (width: number) => {
return [
{ 'ry': null }
];
}
}
//!!!Type '{ initialLeftPageTransforms: (width: number) => { 'ry': any; }[]; }' is not assignable to type 'IBookStyle':
//!!!Types of property 'initialLeftPageTransforms' of types '{ initialLeftPageTransforms: (width: number) => { 'ry': any; }[]; }' and 'IBookStyle' are incompatible:
//!!!Call signatures of types '(width: number) => { 'ry': any; }[]' and '(width: number) => NamedTransform[]' are incompatible:
//!!!Types of property 'pop' of types '{ 'ry': any; }[]' and 'NamedTransform[]' are incompatible:
//!!!Call signatures of types '() => { 'ry': any; }' and '() => NamedTransform' are incompatible:
//!!!Index signatures of types '{ 'ry': any; }' and 'NamedTransform' are incompatible.
Expected: errors as above
Actual: no errors
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSpecIssues related to the TypeScript language specificationIssues related to the TypeScript language specification