Merge remote-tracking branch 'Microsoft/master'
This commit is contained in:
commit
9e0949b84b
|
@ -3119,7 +3119,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
function resolveTupleTypeMembers(type: TupleType) {
|
||||
let arrayType = resolveStructuredTypeMembers(createArrayType(getUnionType(type.elementTypes, /*noDeduplication*/ true)));
|
||||
let arrayType = resolveStructuredTypeMembers(createArrayType(getUnionType(type.elementTypes, /*noSubtypeReduction*/ true)));
|
||||
let members = createTupleTypeMemberSymbols(type.elementTypes);
|
||||
addInheritedMembers(members, arrayType.properties);
|
||||
setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType);
|
||||
|
@ -3451,29 +3451,6 @@ namespace ts {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
// Check if a property with the given name is known anywhere in the given type. In an object
|
||||
// type, a property is considered known if the object type is empty, if it has any index
|
||||
// signatures, or if the property is actually declared in the type. In a union or intersection
|
||||
// type, a property is considered known if it is known in any constituent type.
|
||||
function isKnownProperty(type: Type, name: string): boolean {
|
||||
if (type.flags & TypeFlags.ObjectType && type !== globalObjectType) {
|
||||
const resolved = resolveStructuredTypeMembers(type);
|
||||
return !!(resolved.properties.length === 0 ||
|
||||
resolved.stringIndexType ||
|
||||
resolved.numberIndexType ||
|
||||
getPropertyOfType(type, name));
|
||||
}
|
||||
if (type.flags & TypeFlags.UnionOrIntersection) {
|
||||
for (let t of (<UnionOrIntersectionType>type).types) {
|
||||
if (isKnownProperty(t, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function getSignaturesOfStructuredType(type: Type, kind: SignatureKind): Signature[] {
|
||||
if (type.flags & TypeFlags.StructuredType) {
|
||||
let resolved = resolveStructuredTypeMembers(<ObjectType>type);
|
||||
|
@ -4103,73 +4080,20 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
function isObjectLiteralTypeDuplicateOf(source: ObjectType, target: ObjectType): boolean {
|
||||
let sourceProperties = getPropertiesOfObjectType(source);
|
||||
let targetProperties = getPropertiesOfObjectType(target);
|
||||
if (sourceProperties.length !== targetProperties.length) {
|
||||
return false;
|
||||
}
|
||||
for (let sourceProp of sourceProperties) {
|
||||
let targetProp = getPropertyOfObjectType(target, sourceProp.name);
|
||||
if (!targetProp ||
|
||||
getDeclarationFlagsFromSymbol(targetProp) & (NodeFlags.Private | NodeFlags.Protected) ||
|
||||
!isTypeDuplicateOf(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function isTupleTypeDuplicateOf(source: TupleType, target: TupleType): boolean {
|
||||
let sourceTypes = source.elementTypes;
|
||||
let targetTypes = target.elementTypes;
|
||||
if (sourceTypes.length !== targetTypes.length) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < sourceTypes.length; i++) {
|
||||
if (!isTypeDuplicateOf(sourceTypes[i], targetTypes[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns true if the source type is a duplicate of the target type. A source type is a duplicate of
|
||||
// a target type if the the two are identical, with the exception that the source type may have null or
|
||||
// undefined in places where the target type doesn't. This is by design an asymmetric relationship.
|
||||
function isTypeDuplicateOf(source: Type, target: Type): boolean {
|
||||
if (source === target) {
|
||||
return true;
|
||||
}
|
||||
if (source.flags & TypeFlags.Undefined || source.flags & TypeFlags.Null && !(target.flags & TypeFlags.Undefined)) {
|
||||
return true;
|
||||
}
|
||||
if (source.flags & TypeFlags.ObjectLiteral && target.flags & TypeFlags.ObjectType) {
|
||||
return isObjectLiteralTypeDuplicateOf(<ObjectType>source, <ObjectType>target);
|
||||
}
|
||||
if (isArrayType(source) && isArrayType(target)) {
|
||||
return isTypeDuplicateOf((<TypeReference>source).typeArguments[0], (<TypeReference>target).typeArguments[0]);
|
||||
}
|
||||
if (isTupleType(source) && isTupleType(target)) {
|
||||
return isTupleTypeDuplicateOf(<TupleType>source, <TupleType>target);
|
||||
}
|
||||
return isTypeIdenticalTo(source, target);
|
||||
}
|
||||
|
||||
function isTypeDuplicateOfSomeType(candidate: Type, types: Type[]): boolean {
|
||||
for (let type of types) {
|
||||
if (candidate !== type && isTypeDuplicateOf(candidate, type)) {
|
||||
function isSubtypeOfAny(candidate: Type, types: Type[]): boolean {
|
||||
for (let i = 0, len = types.length; i < len; i++) {
|
||||
if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeDuplicateTypes(types: Type[]) {
|
||||
function removeSubtypes(types: Type[]) {
|
||||
let i = types.length;
|
||||
while (i > 0) {
|
||||
i--;
|
||||
if (isTypeDuplicateOfSomeType(types[i], types)) {
|
||||
if (isSubtypeOfAny(types[i], types)) {
|
||||
types.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
@ -4194,12 +4118,14 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
// We always deduplicate the constituent type set based on object identity, but we'll also deduplicate
|
||||
// based on the structure of the types unless the noDeduplication flag is true, which is the case when
|
||||
// creating a union type from a type node and when instantiating a union type. In both of those cases,
|
||||
// structural deduplication has to be deferred to properly support recursive union types. For example,
|
||||
// a type of the form "type Item = string | (() => Item)" cannot be deduplicated during its declaration.
|
||||
function getUnionType(types: Type[], noDeduplication?: boolean): Type {
|
||||
// We reduce the constituent type set to only include types that aren't subtypes of other types, unless
|
||||
// the noSubtypeReduction flag is specified, in which case we perform a simple deduplication based on
|
||||
// object identity. Subtype reduction is possible only when union types are known not to circularly
|
||||
// reference themselves (as is the case with union types created by expression constructs such as array
|
||||
// literals and the || and ?: operators). Named types can circularly reference themselves and therefore
|
||||
// cannot be deduplicated during their declaration. For example, "type Item = string | (() => Item" is
|
||||
// a named type that circularly references itself.
|
||||
function getUnionType(types: Type[], noSubtypeReduction?: boolean): Type {
|
||||
if (types.length === 0) {
|
||||
return emptyObjectType;
|
||||
}
|
||||
|
@ -4208,12 +4134,12 @@ namespace ts {
|
|||
if (containsTypeAny(typeSet)) {
|
||||
return anyType;
|
||||
}
|
||||
if (noDeduplication) {
|
||||
if (noSubtypeReduction) {
|
||||
removeAllButLast(typeSet, undefinedType);
|
||||
removeAllButLast(typeSet, nullType);
|
||||
}
|
||||
else {
|
||||
removeDuplicateTypes(typeSet);
|
||||
removeSubtypes(typeSet);
|
||||
}
|
||||
if (typeSet.length === 1) {
|
||||
return typeSet[0];
|
||||
|
@ -4230,7 +4156,7 @@ namespace ts {
|
|||
function getTypeFromUnionTypeNode(node: UnionTypeNode): Type {
|
||||
let links = getNodeLinks(node);
|
||||
if (!links.resolvedType) {
|
||||
links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), /*noDeduplication*/ true);
|
||||
links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), /*noSubtypeReduction*/ true);
|
||||
}
|
||||
return links.resolvedType;
|
||||
}
|
||||
|
@ -4526,7 +4452,7 @@ namespace ts {
|
|||
return createTupleType(instantiateList((<TupleType>type).elementTypes, mapper, instantiateType));
|
||||
}
|
||||
if (type.flags & TypeFlags.Union) {
|
||||
return getUnionType(instantiateList((<UnionType>type).types, mapper, instantiateType), /*noDeduplication*/ true);
|
||||
return getUnionType(instantiateList((<UnionType>type).types, mapper, instantiateType), /*noSubtypeReduction*/ true);
|
||||
}
|
||||
if (type.flags & TypeFlags.Intersection) {
|
||||
return getIntersectionType(instantiateList((<IntersectionType>type).types, mapper, instantiateType));
|
||||
|
@ -4622,7 +4548,7 @@ namespace ts {
|
|||
* @param target The right-hand-side of the relation.
|
||||
* @param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
|
||||
* Used as both to determine which checks are performed and as a cache of previously computed results.
|
||||
* @param errorNode The node upon which all errors will be reported, if defined.
|
||||
* @param errorNode The suggested node upon which all errors will be reported, if defined. This may or may not be the actual node used.
|
||||
* @param headMessage If the error chain should be prepended by a head message, then headMessage will be used.
|
||||
* @param containingMessageChain A chain of errors to prepend any new errors found.
|
||||
*/
|
||||
|
@ -4813,11 +4739,41 @@ namespace ts {
|
|||
return Ternary.False;
|
||||
}
|
||||
|
||||
// Check if a property with the given name is known anywhere in the given type. In an object type, a property
|
||||
// is considered known if the object type is empty and the check is for assignability, if the object type has
|
||||
// index signatures, or if the property is actually declared in the object type. In a union or intersection
|
||||
// type, a property is considered known if it is known in any constituent type.
|
||||
function isKnownProperty(type: Type, name: string): boolean {
|
||||
if (type.flags & TypeFlags.ObjectType) {
|
||||
const resolved = resolveStructuredTypeMembers(type);
|
||||
if (relation === assignableRelation && (type === globalObjectType || resolved.properties.length === 0) ||
|
||||
resolved.stringIndexType || resolved.numberIndexType || getPropertyOfType(type, name)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (type.flags & TypeFlags.UnionOrIntersection) {
|
||||
for (let t of (<UnionOrIntersectionType>type).types) {
|
||||
if (isKnownProperty(t, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean {
|
||||
for (let prop of getPropertiesOfObjectType(source)) {
|
||||
if (!isKnownProperty(target, prop.name)) {
|
||||
if (reportErrors) {
|
||||
reportError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target));
|
||||
// We know *exactly* where things went wrong when comparing the types.
|
||||
// Use this property as the error node as this will be more helpful in
|
||||
// reasoning about what went wrong.
|
||||
errorNode = prop.valueDeclaration
|
||||
reportError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,
|
||||
symbolToString(prop),
|
||||
typeToString(target));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -5594,7 +5550,7 @@ namespace ts {
|
|||
return getWidenedTypeOfObjectLiteral(type);
|
||||
}
|
||||
if (type.flags & TypeFlags.Union) {
|
||||
return getUnionType(map((<UnionType>type).types, getWidenedType));
|
||||
return getUnionType(map((<UnionType>type).types, getWidenedType), /*noSubtypeReduction*/ true);
|
||||
}
|
||||
if (isArrayType(type)) {
|
||||
return createArrayType(getWidenedType((<TypeReference>type).typeArguments[0]));
|
||||
|
|
|
@ -243,7 +243,6 @@ namespace ts {
|
|||
"node": ModuleResolutionKind.NodeJs,
|
||||
"classic": ModuleResolutionKind.Classic
|
||||
},
|
||||
experimental: true,
|
||||
description: Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_or_classic_TypeScript_pre_1_6
|
||||
}
|
||||
];
|
||||
|
|
32
src/lib/intl.d.ts
vendored
32
src/lib/intl.d.ts
vendored
|
@ -88,6 +88,7 @@ declare module Intl {
|
|||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
|
@ -157,17 +158,44 @@ interface Number {
|
|||
|
||||
interface Date {
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date and time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a date to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
|
||||
/**
|
||||
* Converts a time to a string by using the current or specified locale.
|
||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||
* @param options An object that contains one or more properties that specify comparison options.
|
||||
*/
|
||||
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||
}
|
||||
|
||||
|
|
|
@ -614,30 +614,30 @@ namespace ts.server {
|
|||
}
|
||||
this.configuredProjects = configuredProjects;
|
||||
}
|
||||
|
||||
removeConfiguredProject(project: Project) {
|
||||
project.projectFileWatcher.close();
|
||||
this.configuredProjects = copyListRemovingItem(project, this.configuredProjects);
|
||||
|
||||
let fileNames = project.getFileNames();
|
||||
for (let fileName of fileNames) {
|
||||
let info = this.getScriptInfo(fileName);
|
||||
if (info.defaultProject == project){
|
||||
info.defaultProject = undefined;
|
||||
}
|
||||
removeConfiguredProject(project: Project) {
|
||||
project.projectFileWatcher.close();
|
||||
this.configuredProjects = copyListRemovingItem(project, this.configuredProjects);
|
||||
|
||||
let fileNames = project.getFileNames();
|
||||
for (let fileName of fileNames) {
|
||||
let info = this.getScriptInfo(fileName);
|
||||
if (info.defaultProject == project) {
|
||||
info.defaultProject = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setConfiguredProjectRoot(info: ScriptInfo) {
|
||||
for (var i = 0, len = this.configuredProjects.length; i < len; i++) {
|
||||
let configuredProject = this.configuredProjects[i];
|
||||
if (configuredProject.isRoot(info)) {
|
||||
info.defaultProject = configuredProject;
|
||||
configuredProject.addOpenRef();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
for (var i = 0, len = this.configuredProjects.length; i < len; i++) {
|
||||
let configuredProject = this.configuredProjects[i];
|
||||
if (configuredProject.isRoot(info)) {
|
||||
info.defaultProject = configuredProject;
|
||||
configuredProject.addOpenRef();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
addOpenFile(info: ScriptInfo) {
|
||||
|
@ -785,7 +785,7 @@ namespace ts.server {
|
|||
updateProjectStructure() {
|
||||
this.log("updating project structure from ...", "Info");
|
||||
this.printProjects();
|
||||
|
||||
|
||||
let unattachedOpenFiles: ScriptInfo[] = [];
|
||||
let openFileRootsConfigured: ScriptInfo[] = [];
|
||||
for (let info of this.openFileRootsConfigured) {
|
||||
|
@ -921,10 +921,10 @@ namespace ts.server {
|
|||
this.printProjects();
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
openOrUpdateConfiguredProjectForFile(fileName: string) {
|
||||
let searchPath = ts.normalizePath(getDirectoryPath(fileName));
|
||||
this.log("Search path: " + searchPath,"Info");
|
||||
this.log("Search path: " + searchPath, "Info");
|
||||
let configFileName = this.findConfigFile(searchPath);
|
||||
if (configFileName) {
|
||||
this.log("Config file name: " + configFileName, "Info");
|
||||
|
@ -935,7 +935,7 @@ namespace ts.server {
|
|||
this.log("Error opening config file " + configFileName + " " + configResult.errorMsg);
|
||||
}
|
||||
else {
|
||||
this.log("Opened configuration file " + configFileName,"Info");
|
||||
this.log("Opened configuration file " + configFileName, "Info");
|
||||
this.configuredProjects.push(configResult.project);
|
||||
}
|
||||
}
|
||||
|
@ -1000,7 +1000,7 @@ namespace ts.server {
|
|||
for (var i = 0, len = this.configuredProjects.length; i < len; i++) {
|
||||
var project = this.configuredProjects[i];
|
||||
project.updateGraph();
|
||||
this.psLogger.info("Project (configured) " + (i+this.inferredProjects.length).toString());
|
||||
this.psLogger.info("Project (configured) " + (i + this.inferredProjects.length).toString());
|
||||
this.psLogger.info(project.filesToString());
|
||||
this.psLogger.info("-----------------------------------------------");
|
||||
}
|
||||
|
@ -1048,10 +1048,10 @@ namespace ts.server {
|
|||
else {
|
||||
var parsedCommandLine = ts.parseConfigFile(rawConfig.config, this.host, dirPath);
|
||||
if (parsedCommandLine.errors && (parsedCommandLine.errors.length > 0)) {
|
||||
return { succeeded: false, error: { errorMsg: "tsconfig option errors" }};
|
||||
return { succeeded: false, error: { errorMsg: "tsconfig option errors" } };
|
||||
}
|
||||
else if (parsedCommandLine.fileNames == null) {
|
||||
return { succeeded: false, error: { errorMsg: "no files found" }}
|
||||
return { succeeded: false, error: { errorMsg: "no files found" } }
|
||||
}
|
||||
else {
|
||||
var projectOptions: ProjectOptions = {
|
||||
|
@ -1068,7 +1068,7 @@ namespace ts.server {
|
|||
let { succeeded, projectOptions, error } = this.configFileToProjectOptions(configFilename);
|
||||
if (!succeeded) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
let proj = this.createProject(configFilename, projectOptions);
|
||||
for (let i = 0, len = projectOptions.files.length; i < len; i++) {
|
||||
|
@ -1086,7 +1086,7 @@ namespace ts.server {
|
|||
return { success: true, project: proj };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateConfiguredProject(project: Project) {
|
||||
if (!this.host.fileExists(project.projectFilename)) {
|
||||
this.log("Config file deleted");
|
||||
|
@ -1098,16 +1098,16 @@ namespace ts.server {
|
|||
return error;
|
||||
}
|
||||
else {
|
||||
let oldFileNames = project.compilerService.host.roots.map(info => info.fileName);
|
||||
let oldFileNames = project.compilerService.host.roots.map(info => info.fileName);
|
||||
let newFileNames = projectOptions.files;
|
||||
let fileNamesToRemove = oldFileNames.filter(f => newFileNames.indexOf(f) < 0);
|
||||
let fileNamesToAdd = newFileNames.filter(f => oldFileNames.indexOf(f) < 0);
|
||||
|
||||
|
||||
for (let fileName of fileNamesToRemove) {
|
||||
let info = this.getScriptInfo(fileName);
|
||||
project.removeRoot(info);
|
||||
}
|
||||
|
||||
|
||||
for (let fileName of fileNamesToAdd) {
|
||||
let info = this.getScriptInfo(fileName);
|
||||
if (!info) {
|
||||
|
|
|
@ -5885,6 +5885,7 @@ namespace ts {
|
|||
result.push(getReferenceEntryFromNode(node));
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.ClassExpression:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
// Make sure the container belongs to the same class
|
||||
// and has the appropriate static modifier from the original container.
|
||||
|
|
|
@ -294,8 +294,8 @@ module EmptyTypes {
|
|||
|
||||
// Order matters here so test all the variants
|
||||
var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }];
|
||||
>a1 : ({ x: number; y: string; } | { x: string; y: string; } | { x: any; y: string; })[]
|
||||
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : ({ x: number; y: string; } | { x: string; y: string; } | { x: any; y: string; })[]
|
||||
>a1 : { x: any; y: string; }[]
|
||||
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>0 : number
|
||||
|
@ -313,8 +313,8 @@ module EmptyTypes {
|
|||
>'a' : string
|
||||
|
||||
var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }];
|
||||
>a2 : ({ x: any; y: string; } | { x: number; y: string; } | { x: string; y: string; })[]
|
||||
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : ({ x: any; y: string; } | { x: number; y: string; } | { x: string; y: string; })[]
|
||||
>a2 : { x: any; y: string; }[]
|
||||
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
||||
>x : any
|
||||
>anyObj : any
|
||||
|
@ -332,8 +332,8 @@ module EmptyTypes {
|
|||
>'a' : string
|
||||
|
||||
var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }];
|
||||
>a3 : ({ x: number; y: string; } | { x: any; y: string; } | { x: string; y: string; })[]
|
||||
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : ({ x: number; y: string; } | { x: any; y: string; } | { x: string; y: string; })[]
|
||||
>a3 : { x: any; y: string; }[]
|
||||
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>0 : number
|
||||
|
@ -639,7 +639,7 @@ module NonEmptyTypes {
|
|||
>x : number
|
||||
>y : base
|
||||
>base : base
|
||||
>[{ x: 7, y: new derived() }, { x: 5, y: new base() }] : ({ x: number; y: derived; } | { x: number; y: base; })[]
|
||||
>[{ x: 7, y: new derived() }, { x: 5, y: new base() }] : { x: number; y: base; }[]
|
||||
>{ x: 7, y: new derived() } : { x: number; y: derived; }
|
||||
>x : number
|
||||
>7 : number
|
||||
|
@ -658,7 +658,7 @@ module NonEmptyTypes {
|
|||
>x : boolean
|
||||
>y : base
|
||||
>base : base
|
||||
>[{ x: true, y: new derived() }, { x: false, y: new base() }] : ({ x: boolean; y: derived; } | { x: boolean; y: base; })[]
|
||||
>[{ x: true, y: new derived() }, { x: false, y: new base() }] : { x: boolean; y: base; }[]
|
||||
>{ x: true, y: new derived() } : { x: boolean; y: derived; }
|
||||
>x : boolean
|
||||
>true : boolean
|
||||
|
@ -697,8 +697,8 @@ module NonEmptyTypes {
|
|||
|
||||
// Order matters here so test all the variants
|
||||
var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }];
|
||||
>a1 : ({ x: number; y: string; } | { x: string; y: string; } | { x: any; y: string; })[]
|
||||
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : ({ x: number; y: string; } | { x: string; y: string; } | { x: any; y: string; })[]
|
||||
>a1 : { x: any; y: string; }[]
|
||||
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>0 : number
|
||||
|
@ -716,8 +716,8 @@ module NonEmptyTypes {
|
|||
>'a' : string
|
||||
|
||||
var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }];
|
||||
>a2 : ({ x: any; y: string; } | { x: number; y: string; } | { x: string; y: string; })[]
|
||||
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : ({ x: any; y: string; } | { x: number; y: string; } | { x: string; y: string; })[]
|
||||
>a2 : { x: any; y: string; }[]
|
||||
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
||||
>x : any
|
||||
>anyObj : any
|
||||
|
@ -735,8 +735,8 @@ module NonEmptyTypes {
|
|||
>'a' : string
|
||||
|
||||
var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }];
|
||||
>a3 : ({ x: number; y: string; } | { x: any; y: string; } | { x: string; y: string; })[]
|
||||
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : ({ x: number; y: string; } | { x: any; y: string; } | { x: string; y: string; })[]
|
||||
>a3 : { x: any; y: string; }[]
|
||||
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
||||
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
||||
>x : number
|
||||
>0 : number
|
||||
|
@ -769,29 +769,29 @@ module NonEmptyTypes {
|
|||
>base2 : typeof base2
|
||||
|
||||
var b1 = [baseObj, base2Obj, ifaceObj];
|
||||
>b1 : (base | base2 | iface)[]
|
||||
>[baseObj, base2Obj, ifaceObj] : (base | base2 | iface)[]
|
||||
>b1 : iface[]
|
||||
>[baseObj, base2Obj, ifaceObj] : iface[]
|
||||
>baseObj : base
|
||||
>base2Obj : base2
|
||||
>ifaceObj : iface
|
||||
|
||||
var b2 = [base2Obj, baseObj, ifaceObj];
|
||||
>b2 : (base2 | base | iface)[]
|
||||
>[base2Obj, baseObj, ifaceObj] : (base2 | base | iface)[]
|
||||
>b2 : iface[]
|
||||
>[base2Obj, baseObj, ifaceObj] : iface[]
|
||||
>base2Obj : base2
|
||||
>baseObj : base
|
||||
>ifaceObj : iface
|
||||
|
||||
var b3 = [baseObj, ifaceObj, base2Obj];
|
||||
>b3 : (base | iface | base2)[]
|
||||
>[baseObj, ifaceObj, base2Obj] : (base | iface | base2)[]
|
||||
>b3 : iface[]
|
||||
>[baseObj, ifaceObj, base2Obj] : iface[]
|
||||
>baseObj : base
|
||||
>ifaceObj : iface
|
||||
>base2Obj : base2
|
||||
|
||||
var b4 = [ifaceObj, baseObj, base2Obj];
|
||||
>b4 : (iface | base | base2)[]
|
||||
>[ifaceObj, baseObj, base2Obj] : (iface | base | base2)[]
|
||||
>b4 : iface[]
|
||||
>[ifaceObj, baseObj, base2Obj] : iface[]
|
||||
>ifaceObj : iface
|
||||
>baseObj : base
|
||||
>base2Obj : base2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
tests/cases/compiler/arrayCast.ts(3,23): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.
|
||||
|
||||
|
@ -7,7 +7,7 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: strin
|
|||
// Should fail. Even though the array is contextually typed with { id: number }[], it still
|
||||
// has type { foo: string }[], which is not assignable to { id: number }[].
|
||||
<{ id: number; }[]>[{ foo: "s" }];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
!!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2352: Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
tests/cases/compiler/arrayLiteralTypeInference.ts(13,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'.
|
||||
tests/cases/compiler/arrayLiteralTypeInference.ts(14,14): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'.
|
||||
Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'.
|
||||
Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'.
|
||||
Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'.
|
||||
tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
tests/cases/compiler/arrayLiteralTypeInference.ts(31,18): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'.
|
||||
|
@ -22,12 +22,12 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({
|
|||
}
|
||||
|
||||
var x1: Action[] = [
|
||||
~~
|
||||
{ id: 2, trueness: false },
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'.
|
||||
!!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'.
|
||||
!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'.
|
||||
{ id: 2, trueness: false },
|
||||
{ id: 3, name: "three" }
|
||||
]
|
||||
|
||||
|
@ -43,13 +43,13 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({
|
|||
]
|
||||
|
||||
var z1: { id: number }[] =
|
||||
~~
|
||||
[
|
||||
{ id: 2, trueness: false },
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'.
|
||||
[
|
||||
{ id: 2, trueness: false },
|
||||
{ id: 3, name: "three" }
|
||||
]
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ var cs = [a, b, c]; // { x: number; y?: number };[]
|
|||
>c : { x: number; a?: number; }
|
||||
|
||||
var ds = [(x: Object) => 1, (x: string) => 2]; // { (x:Object) => number }[]
|
||||
>ds : (((x: Object) => number) | ((x: string) => number))[]
|
||||
>[(x: Object) => 1, (x: string) => 2] : (((x: Object) => number) | ((x: string) => number))[]
|
||||
>ds : ((x: Object) => number)[]
|
||||
>[(x: Object) => 1, (x: string) => 2] : ((x: Object) => number)[]
|
||||
>(x: Object) => 1 : (x: Object) => number
|
||||
>x : Object
|
||||
>Object : Object
|
||||
|
@ -47,8 +47,8 @@ var ds = [(x: Object) => 1, (x: string) => 2]; // { (x:Object) => number }[]
|
|||
>2 : number
|
||||
|
||||
var es = [(x: string) => 2, (x: Object) => 1]; // { (x:string) => number }[]
|
||||
>es : (((x: string) => number) | ((x: Object) => number))[]
|
||||
>[(x: string) => 2, (x: Object) => 1] : (((x: string) => number) | ((x: Object) => number))[]
|
||||
>es : ((x: string) => number)[]
|
||||
>[(x: string) => 2, (x: Object) => 1] : ((x: string) => number)[]
|
||||
>(x: string) => 2 : (x: string) => number
|
||||
>x : string
|
||||
>2 : number
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,5): error TS2322: Type '({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[]' is not assignable to type '{ [n: number]: { a: string; b: number; }; }'.
|
||||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,77): error TS2322: Type '({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[]' is not assignable to type '{ [n: number]: { a: string; b: number; }; }'.
|
||||
Index signatures are incompatible.
|
||||
Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'.
|
||||
Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'.
|
||||
|
@ -30,7 +30,7 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,5): error
|
|||
|
||||
// Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[]
|
||||
var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }];
|
||||
~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2322: Type '({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[]' is not assignable to type '{ [n: number]: { a: string; b: number; }; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'.
|
||||
|
|
|
@ -77,8 +77,8 @@ var myDerivedList: DerivedList<number>;
|
|||
>DerivedList : DerivedList<U>
|
||||
|
||||
var as = [list, myDerivedList]; // List<number>[]
|
||||
>as : (List<number> | DerivedList<number>)[]
|
||||
>[list, myDerivedList] : (List<number> | DerivedList<number>)[]
|
||||
>as : List<number>[]
|
||||
>[list, myDerivedList] : List<number>[]
|
||||
>list : List<number>
|
||||
>myDerivedList : DerivedList<number>
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts(17,13): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts(26,10): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts (2 errors) ====
|
||||
// valid uses of arrays of function types
|
||||
|
||||
var x = [() => 1, () => { }];
|
||||
var r2 = x[0]();
|
||||
|
||||
class C {
|
||||
foo: string;
|
||||
}
|
||||
var y = [C, C];
|
||||
var r3 = new y[0]();
|
||||
|
||||
var a: { (x: number): number; (x: string): string; };
|
||||
var b: { (x: number): number; (x: string): string; };
|
||||
var c: { (x: number): number; (x: any): any; };
|
||||
var z = [a, b, c];
|
||||
var r4 = z[0];
|
||||
var r5 = r4(''); // any not string
|
||||
~~
|
||||
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||
var r5b = r4(1);
|
||||
|
||||
var a2: { <T>(x: T): number; (x: string): string;};
|
||||
var b2: { <T>(x: T): number; (x: string): string; };
|
||||
var c2: { (x: number): number; <T>(x: T): any; };
|
||||
|
||||
var z2 = [a2, b2, c2];
|
||||
var r6 = z2[0];
|
||||
var r7 = r6(''); // any not string
|
||||
~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
93
tests/baselines/reference/arrayOfFunctionTypes3.symbols
Normal file
93
tests/baselines/reference/arrayOfFunctionTypes3.symbols
Normal file
|
@ -0,0 +1,93 @@
|
|||
=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts ===
|
||||
// valid uses of arrays of function types
|
||||
|
||||
var x = [() => 1, () => { }];
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 2, 3))
|
||||
|
||||
var r2 = x[0]();
|
||||
>r2 : Symbol(r2, Decl(arrayOfFunctionTypes3.ts, 3, 3))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 2, 3))
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(arrayOfFunctionTypes3.ts, 3, 16))
|
||||
|
||||
foo: string;
|
||||
>foo : Symbol(foo, Decl(arrayOfFunctionTypes3.ts, 5, 9))
|
||||
}
|
||||
var y = [C, C];
|
||||
>y : Symbol(y, Decl(arrayOfFunctionTypes3.ts, 8, 3))
|
||||
>C : Symbol(C, Decl(arrayOfFunctionTypes3.ts, 3, 16))
|
||||
>C : Symbol(C, Decl(arrayOfFunctionTypes3.ts, 3, 16))
|
||||
|
||||
var r3 = new y[0]();
|
||||
>r3 : Symbol(r3, Decl(arrayOfFunctionTypes3.ts, 9, 3))
|
||||
>y : Symbol(y, Decl(arrayOfFunctionTypes3.ts, 8, 3))
|
||||
|
||||
var a: { (x: number): number; (x: string): string; };
|
||||
>a : Symbol(a, Decl(arrayOfFunctionTypes3.ts, 11, 3))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 11, 10))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 11, 31))
|
||||
|
||||
var b: { (x: number): number; (x: string): string; };
|
||||
>b : Symbol(b, Decl(arrayOfFunctionTypes3.ts, 12, 3))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 12, 10))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 12, 31))
|
||||
|
||||
var c: { (x: number): number; (x: any): any; };
|
||||
>c : Symbol(c, Decl(arrayOfFunctionTypes3.ts, 13, 3))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 13, 10))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 13, 31))
|
||||
|
||||
var z = [a, b, c];
|
||||
>z : Symbol(z, Decl(arrayOfFunctionTypes3.ts, 14, 3))
|
||||
>a : Symbol(a, Decl(arrayOfFunctionTypes3.ts, 11, 3))
|
||||
>b : Symbol(b, Decl(arrayOfFunctionTypes3.ts, 12, 3))
|
||||
>c : Symbol(c, Decl(arrayOfFunctionTypes3.ts, 13, 3))
|
||||
|
||||
var r4 = z[0];
|
||||
>r4 : Symbol(r4, Decl(arrayOfFunctionTypes3.ts, 15, 3))
|
||||
>z : Symbol(z, Decl(arrayOfFunctionTypes3.ts, 14, 3))
|
||||
|
||||
var r5 = r4(''); // any not string
|
||||
>r5 : Symbol(r5, Decl(arrayOfFunctionTypes3.ts, 16, 3))
|
||||
>r4 : Symbol(r4, Decl(arrayOfFunctionTypes3.ts, 15, 3))
|
||||
|
||||
var r5b = r4(1);
|
||||
>r5b : Symbol(r5b, Decl(arrayOfFunctionTypes3.ts, 17, 3))
|
||||
>r4 : Symbol(r4, Decl(arrayOfFunctionTypes3.ts, 15, 3))
|
||||
|
||||
var a2: { <T>(x: T): number; (x: string): string;};
|
||||
>a2 : Symbol(a2, Decl(arrayOfFunctionTypes3.ts, 19, 3))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 19, 11))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 19, 14))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 19, 11))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 19, 30))
|
||||
|
||||
var b2: { <T>(x: T): number; (x: string): string; };
|
||||
>b2 : Symbol(b2, Decl(arrayOfFunctionTypes3.ts, 20, 3))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 20, 11))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 20, 14))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 20, 11))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 20, 30))
|
||||
|
||||
var c2: { (x: number): number; <T>(x: T): any; };
|
||||
>c2 : Symbol(c2, Decl(arrayOfFunctionTypes3.ts, 21, 3))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 21, 11))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 21, 32))
|
||||
>x : Symbol(x, Decl(arrayOfFunctionTypes3.ts, 21, 35))
|
||||
>T : Symbol(T, Decl(arrayOfFunctionTypes3.ts, 21, 32))
|
||||
|
||||
var z2 = [a2, b2, c2];
|
||||
>z2 : Symbol(z2, Decl(arrayOfFunctionTypes3.ts, 23, 3))
|
||||
>a2 : Symbol(a2, Decl(arrayOfFunctionTypes3.ts, 19, 3))
|
||||
>b2 : Symbol(b2, Decl(arrayOfFunctionTypes3.ts, 20, 3))
|
||||
>c2 : Symbol(c2, Decl(arrayOfFunctionTypes3.ts, 21, 3))
|
||||
|
||||
var r6 = z2[0];
|
||||
>r6 : Symbol(r6, Decl(arrayOfFunctionTypes3.ts, 24, 3))
|
||||
>z2 : Symbol(z2, Decl(arrayOfFunctionTypes3.ts, 23, 3))
|
||||
|
||||
var r7 = r6(''); // any not string
|
||||
>r7 : Symbol(r7, Decl(arrayOfFunctionTypes3.ts, 25, 3))
|
||||
>r6 : Symbol(r6, Decl(arrayOfFunctionTypes3.ts, 24, 3))
|
||||
|
116
tests/baselines/reference/arrayOfFunctionTypes3.types
Normal file
116
tests/baselines/reference/arrayOfFunctionTypes3.types
Normal file
|
@ -0,0 +1,116 @@
|
|||
=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts ===
|
||||
// valid uses of arrays of function types
|
||||
|
||||
var x = [() => 1, () => { }];
|
||||
>x : (() => void)[]
|
||||
>[() => 1, () => { }] : (() => void)[]
|
||||
>() => 1 : () => number
|
||||
>1 : number
|
||||
>() => { } : () => void
|
||||
|
||||
var r2 = x[0]();
|
||||
>r2 : void
|
||||
>x[0]() : void
|
||||
>x[0] : () => void
|
||||
>x : (() => void)[]
|
||||
>0 : number
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
foo: string;
|
||||
>foo : string
|
||||
}
|
||||
var y = [C, C];
|
||||
>y : typeof C[]
|
||||
>[C, C] : typeof C[]
|
||||
>C : typeof C
|
||||
>C : typeof C
|
||||
|
||||
var r3 = new y[0]();
|
||||
>r3 : C
|
||||
>new y[0]() : C
|
||||
>y[0] : typeof C
|
||||
>y : typeof C[]
|
||||
>0 : number
|
||||
|
||||
var a: { (x: number): number; (x: string): string; };
|
||||
>a : { (x: number): number; (x: string): string; }
|
||||
>x : number
|
||||
>x : string
|
||||
|
||||
var b: { (x: number): number; (x: string): string; };
|
||||
>b : { (x: number): number; (x: string): string; }
|
||||
>x : number
|
||||
>x : string
|
||||
|
||||
var c: { (x: number): number; (x: any): any; };
|
||||
>c : { (x: number): number; (x: any): any; }
|
||||
>x : number
|
||||
>x : any
|
||||
|
||||
var z = [a, b, c];
|
||||
>z : { (x: number): number; (x: any): any; }[]
|
||||
>[a, b, c] : { (x: number): number; (x: any): any; }[]
|
||||
>a : { (x: number): number; (x: string): string; }
|
||||
>b : { (x: number): number; (x: string): string; }
|
||||
>c : { (x: number): number; (x: any): any; }
|
||||
|
||||
var r4 = z[0];
|
||||
>r4 : { (x: number): number; (x: any): any; }
|
||||
>z[0] : { (x: number): number; (x: any): any; }
|
||||
>z : { (x: number): number; (x: any): any; }[]
|
||||
>0 : number
|
||||
|
||||
var r5 = r4(''); // any not string
|
||||
>r5 : any
|
||||
>r4('') : any
|
||||
>r4 : { (x: number): number; (x: any): any; }
|
||||
>'' : string
|
||||
|
||||
var r5b = r4(1);
|
||||
>r5b : number
|
||||
>r4(1) : number
|
||||
>r4 : { (x: number): number; (x: any): any; }
|
||||
>1 : number
|
||||
|
||||
var a2: { <T>(x: T): number; (x: string): string;};
|
||||
>a2 : { <T>(x: T): number; (x: string): string; }
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>x : string
|
||||
|
||||
var b2: { <T>(x: T): number; (x: string): string; };
|
||||
>b2 : { <T>(x: T): number; (x: string): string; }
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
>x : string
|
||||
|
||||
var c2: { (x: number): number; <T>(x: T): any; };
|
||||
>c2 : { (x: number): number; <T>(x: T): any; }
|
||||
>x : number
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
|
||||
var z2 = [a2, b2, c2];
|
||||
>z2 : { (x: number): number; <T>(x: T): any; }[]
|
||||
>[a2, b2, c2] : { (x: number): number; <T>(x: T): any; }[]
|
||||
>a2 : { <T>(x: T): number; (x: string): string; }
|
||||
>b2 : { <T>(x: T): number; (x: string): string; }
|
||||
>c2 : { (x: number): number; <T>(x: T): any; }
|
||||
|
||||
var r6 = z2[0];
|
||||
>r6 : { (x: number): number; <T>(x: T): any; }
|
||||
>z2[0] : { (x: number): number; <T>(x: T): any; }
|
||||
>z2 : { (x: number): number; <T>(x: T): any; }[]
|
||||
>0 : number
|
||||
|
||||
var r7 = r6(''); // any not string
|
||||
>r7 : any
|
||||
>r6('') : any
|
||||
>r6 : { (x: number): number; <T>(x: T): any; }
|
||||
>'' : string
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,27): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,8): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(5,1): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(5,13): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
|
@ -14,17 +14,17 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
|
|||
|
||||
==== tests/cases/compiler/assignmentCompatBug2.ts (6 errors) ====
|
||||
var b2: { b: number;} = { a: 0 }; // error
|
||||
~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
|
||||
b2 = { a: 0 }; // error
|
||||
~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
|
||||
b2 = {b: 0, a: 0 };
|
||||
~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/assignmentCompatBug5.ts(2,6): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug5.ts(2,8): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug5.ts(5,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
@ -12,7 +12,7 @@ tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of typ
|
|||
==== tests/cases/compiler/assignmentCompatBug5.ts (4 errors) ====
|
||||
function foo1(x: { a: number; }) { }
|
||||
foo1({ b: 5 });
|
||||
~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ var r = true ? 1 : 2;
|
|||
>2 : number
|
||||
|
||||
var r3 = true ? 1 : {};
|
||||
>r3 : number | {}
|
||||
>true ? 1 : {} : number | {}
|
||||
>r3 : {}
|
||||
>true ? 1 : {} : {}
|
||||
>true : boolean
|
||||
>1 : number
|
||||
>{} : {}
|
||||
|
@ -67,8 +67,8 @@ var r5 = true ? b : a; // typeof b
|
|||
>a : { x: number; y?: number; }
|
||||
|
||||
var r6 = true ? (x: number) => { } : (x: Object) => { }; // returns number => void
|
||||
>r6 : ((x: number) => void) | ((x: Object) => void)
|
||||
>true ? (x: number) => { } : (x: Object) => { } : ((x: number) => void) | ((x: Object) => void)
|
||||
>r6 : (x: number) => void
|
||||
>true ? (x: number) => { } : (x: Object) => { } : (x: number) => void
|
||||
>true : boolean
|
||||
>(x: number) => { } : (x: number) => void
|
||||
>x : number
|
||||
|
@ -80,7 +80,7 @@ var r7: (x: Object) => void = true ? (x: number) => { } : (x: Object) => { };
|
|||
>r7 : (x: Object) => void
|
||||
>x : Object
|
||||
>Object : Object
|
||||
>true ? (x: number) => { } : (x: Object) => { } : ((x: number) => void) | ((x: Object) => void)
|
||||
>true ? (x: number) => { } : (x: Object) => { } : (x: number) => void
|
||||
>true : boolean
|
||||
>(x: number) => { } : (x: number) => void
|
||||
>x : number
|
||||
|
@ -89,8 +89,8 @@ var r7: (x: Object) => void = true ? (x: number) => { } : (x: Object) => { };
|
|||
>Object : Object
|
||||
|
||||
var r8 = true ? (x: Object) => { } : (x: number) => { }; // returns Object => void
|
||||
>r8 : ((x: Object) => void) | ((x: number) => void)
|
||||
>true ? (x: Object) => { } : (x: number) => { } : ((x: Object) => void) | ((x: number) => void)
|
||||
>r8 : (x: Object) => void
|
||||
>true ? (x: Object) => { } : (x: number) => { } : (x: Object) => void
|
||||
>true : boolean
|
||||
>(x: Object) => { } : (x: Object) => void
|
||||
>x : Object
|
||||
|
@ -107,8 +107,8 @@ var r10: Base = true ? derived : derived2; // no error since we use the contextu
|
|||
>derived2 : Derived2
|
||||
|
||||
var r11 = true ? base : derived2;
|
||||
>r11 : Base | Derived2
|
||||
>true ? base : derived2 : Base | Derived2
|
||||
>r11 : Base
|
||||
>true ? base : derived2 : Base
|
||||
>true : boolean
|
||||
>base : Base
|
||||
>derived2 : Derived2
|
||||
|
|
|
@ -27,43 +27,43 @@ var z: Z;
|
|||
|
||||
// All these arrays should be X[]
|
||||
var b1 = [x, y, z];
|
||||
>b1 : (X | Y | Z)[]
|
||||
>[x, y, z] : (X | Y | Z)[]
|
||||
>b1 : X[]
|
||||
>[x, y, z] : X[]
|
||||
>x : X
|
||||
>y : Y
|
||||
>z : Z
|
||||
|
||||
var b2 = [x, z, y];
|
||||
>b2 : (X | Z | Y)[]
|
||||
>[x, z, y] : (X | Z | Y)[]
|
||||
>b2 : X[]
|
||||
>[x, z, y] : X[]
|
||||
>x : X
|
||||
>z : Z
|
||||
>y : Y
|
||||
|
||||
var b3 = [y, x, z];
|
||||
>b3 : (Y | X | Z)[]
|
||||
>[y, x, z] : (Y | X | Z)[]
|
||||
>b3 : X[]
|
||||
>[y, x, z] : X[]
|
||||
>y : Y
|
||||
>x : X
|
||||
>z : Z
|
||||
|
||||
var b4 = [y, z, x];
|
||||
>b4 : (Y | Z | X)[]
|
||||
>[y, z, x] : (Y | Z | X)[]
|
||||
>b4 : X[]
|
||||
>[y, z, x] : X[]
|
||||
>y : Y
|
||||
>z : Z
|
||||
>x : X
|
||||
|
||||
var b5 = [z, x, y];
|
||||
>b5 : (Z | X | Y)[]
|
||||
>[z, x, y] : (Z | X | Y)[]
|
||||
>b5 : X[]
|
||||
>[z, x, y] : X[]
|
||||
>z : Z
|
||||
>x : X
|
||||
>y : Y
|
||||
|
||||
var b6 = [z, y, x];
|
||||
>b6 : (Z | Y | X)[]
|
||||
>[z, y, x] : (Z | Y | X)[]
|
||||
>b6 : X[]
|
||||
>[z, y, x] : X[]
|
||||
>z : Z
|
||||
>y : Y
|
||||
>x : X
|
||||
|
|
|
@ -31,21 +31,21 @@ var b: B;
|
|||
//Cond ? Expr1 : Expr2, Expr1 is supertype
|
||||
//Be Not contextually typed
|
||||
true ? x : a;
|
||||
>true ? x : a : X | A
|
||||
>true ? x : a : X
|
||||
>true : boolean
|
||||
>x : X
|
||||
>a : A
|
||||
|
||||
var result1 = true ? x : a;
|
||||
>result1 : X | A
|
||||
>true ? x : a : X | A
|
||||
>result1 : X
|
||||
>true ? x : a : X
|
||||
>true : boolean
|
||||
>x : X
|
||||
>a : A
|
||||
|
||||
//Expr1 and Expr2 are literals
|
||||
true ? {} : 1;
|
||||
>true ? {} : 1 : {} | number
|
||||
>true ? {} : 1 : {}
|
||||
>true : boolean
|
||||
>{} : {}
|
||||
>1 : number
|
||||
|
@ -63,8 +63,8 @@ true ? { a: 1 } : { a: 2, b: 'string' };
|
|||
>'string' : string
|
||||
|
||||
var result2 = true ? {} : 1;
|
||||
>result2 : {} | number
|
||||
>true ? {} : 1 : {} | number
|
||||
>result2 : {}
|
||||
>true ? {} : 1 : {}
|
||||
>true : boolean
|
||||
>{} : {}
|
||||
>1 : number
|
||||
|
@ -86,7 +86,7 @@ var result3 = true ? { a: 1 } : { a: 2, b: 'string' };
|
|||
var resultIsX1: X = true ? x : a;
|
||||
>resultIsX1 : X
|
||||
>X : X
|
||||
>true ? x : a : X | A
|
||||
>true ? x : a : X
|
||||
>true : boolean
|
||||
>x : X
|
||||
>a : A
|
||||
|
@ -95,7 +95,7 @@ var result4: (t: A) => any = true ? (m) => m.propertyX : (n) => n.propertyA;
|
|||
>result4 : (t: A) => any
|
||||
>t : A
|
||||
>A : A
|
||||
>true ? (m) => m.propertyX : (n) => n.propertyA : ((m: A) => any) | ((n: A) => number)
|
||||
>true ? (m) => m.propertyX : (n) => n.propertyA : (m: A) => any
|
||||
>true : boolean
|
||||
>(m) => m.propertyX : (m: A) => any
|
||||
>m : A
|
||||
|
@ -111,21 +111,21 @@ var result4: (t: A) => any = true ? (m) => m.propertyX : (n) => n.propertyA;
|
|||
//Cond ? Expr1 : Expr2, Expr2 is supertype
|
||||
//Be Not contextually typed
|
||||
true ? a : x;
|
||||
>true ? a : x : A | X
|
||||
>true ? a : x : X
|
||||
>true : boolean
|
||||
>a : A
|
||||
>x : X
|
||||
|
||||
var result5 = true ? a : x;
|
||||
>result5 : A | X
|
||||
>true ? a : x : A | X
|
||||
>result5 : X
|
||||
>true ? a : x : X
|
||||
>true : boolean
|
||||
>a : A
|
||||
>x : X
|
||||
|
||||
//Expr1 and Expr2 are literals
|
||||
true ? 1 : {};
|
||||
>true ? 1 : {} : number | {}
|
||||
>true ? 1 : {} : {}
|
||||
>true : boolean
|
||||
>1 : number
|
||||
>{} : {}
|
||||
|
@ -143,8 +143,8 @@ true ? { a: 2, b: 'string' } : { a: 1 };
|
|||
>1 : number
|
||||
|
||||
var result6 = true ? 1 : {};
|
||||
>result6 : number | {}
|
||||
>true ? 1 : {} : number | {}
|
||||
>result6 : {}
|
||||
>true ? 1 : {} : {}
|
||||
>true : boolean
|
||||
>1 : number
|
||||
>{} : {}
|
||||
|
@ -166,7 +166,7 @@ var result7 = true ? { a: 2, b: 'string' } : { a: 1 };
|
|||
var resultIsX2: X = true ? x : a;
|
||||
>resultIsX2 : X
|
||||
>X : X
|
||||
>true ? x : a : X | A
|
||||
>true ? x : a : X
|
||||
>true : boolean
|
||||
>x : X
|
||||
>a : A
|
||||
|
@ -175,7 +175,7 @@ var result8: (t: A) => any = true ? (m) => m.propertyA : (n) => n.propertyX;
|
|||
>result8 : (t: A) => any
|
||||
>t : A
|
||||
>A : A
|
||||
>true ? (m) => m.propertyA : (n) => n.propertyX : ((m: A) => number) | ((n: A) => any)
|
||||
>true ? (m) => m.propertyA : (n) => n.propertyX : (n: A) => any
|
||||
>true : boolean
|
||||
>(m) => m.propertyA : (m: A) => number
|
||||
>m : A
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/contextualTyping12.ts(1,13): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
tests/cases/compiler/contextualTyping12.ts(1,57): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
@ -6,7 +6,7 @@ tests/cases/compiler/contextualTyping12.ts(1,13): error TS2322: Type '({ id: num
|
|||
|
||||
==== tests/cases/compiler/contextualTyping12.ts (1 errors) ====
|
||||
class foo { public bar:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/compiler/contextualTyping17.ts(1,33): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
tests/cases/compiler/contextualTyping17.ts(1,47): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping17.ts (1 errors) ====
|
||||
var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"};
|
||||
~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/compiler/contextualTyping2.ts(1,5): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
tests/cases/compiler/contextualTyping2.ts(1,32): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping2.ts (1 errors) ====
|
||||
var foo: {id:number;} = {id:4, name:"foo"};
|
||||
~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/contextualTyping20.ts(1,36): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
tests/cases/compiler/contextualTyping20.ts(1,58): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
@ -6,7 +6,7 @@ tests/cases/compiler/contextualTyping20.ts(1,36): error TS2322: Type '({ id: num
|
|||
|
||||
==== tests/cases/compiler/contextualTyping20.ts (1 errors) ====
|
||||
var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2, name:"foo"}];
|
||||
~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/compiler/contextualTyping4.ts(1,13): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
tests/cases/compiler/contextualTyping4.ts(1,46): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping4.ts (1 errors) ====
|
||||
class foo { public bar:{id:number;} = {id:5, name:"foo"}; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/contextualTyping9.ts(1,5): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
tests/cases/compiler/contextualTyping9.ts(1,42): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
|
||||
|
@ -6,7 +6,7 @@ tests/cases/compiler/contextualTyping9.ts(1,5): error TS2322: Type '({ id: numbe
|
|||
|
||||
==== tests/cases/compiler/contextualTyping9.ts (1 errors) ====
|
||||
var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}];
|
||||
~~~
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
|
||||
|
|
|
@ -23,8 +23,8 @@ class C extends A {
|
|||
}
|
||||
|
||||
var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }];
|
||||
>xs : (((x: A) => void) | ((x: B) => void) | ((x: C) => void))[]
|
||||
>[(x: A) => { }, (x: B) => { }, (x: C) => { }] : (((x: A) => void) | ((x: B) => void) | ((x: C) => void))[]
|
||||
>xs : ((x: A) => void)[]
|
||||
>[(x: A) => { }, (x: B) => { }, (x: C) => { }] : ((x: A) => void)[]
|
||||
>(x: A) => { } : (x: A) => void
|
||||
>x : A
|
||||
>A : A
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts(14,28): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts(14,36): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
|||
bar() {
|
||||
var r = super.foo({ a: 1 }); // { a: number }
|
||||
var r2 = super.foo({ a: 1, b: 2 }); // { a: number }
|
||||
~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
||||
var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; }
|
||||
|
|
|
@ -7,7 +7,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7
|
|||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,16): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
|
||||
Types of property '0' are incompatible.
|
||||
Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
|
||||
Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'.
|
||||
|
@ -43,7 +43,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1
|
|||
}
|
||||
|
||||
var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
|
||||
!!! error TS2345: Types of property '0' are incompatible.
|
||||
!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
|
||||
|
|
|
@ -7,7 +7,7 @@ tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDec
|
|||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(40,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(43,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(46,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(47,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | C2 | D<string>)[]'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(47,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | D<string>)[]'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(50,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D<string>[]', but here has type 'D<number>[]'.
|
||||
tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts(53,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'.
|
||||
|
||||
|
@ -79,7 +79,7 @@ tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDec
|
|||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'.
|
||||
for( var arr = [new C(), new C2(), new D<string>()];;){}
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | C2 | D<string>)[]'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | D<string>)[]'.
|
||||
|
||||
for(var arr2 = [new D<string>()];;){}
|
||||
for( var arr2 = new Array<D<number>>();;){}
|
||||
|
|
|
@ -342,7 +342,7 @@ var f7: (x: number) => string | number = x => { // should be (x: number) => numb
|
|||
var f8: (x: number) => any = x => { // should be (x: number) => Base
|
||||
>f8 : (x: number) => any
|
||||
>x : number
|
||||
>x => { // should be (x: number) => Base return new Base(); return new Derived2();} : (x: number) => Base | Derived2
|
||||
>x => { // should be (x: number) => Base return new Base(); return new Derived2();} : (x: number) => Base
|
||||
>x : number
|
||||
|
||||
return new Base();
|
||||
|
@ -356,7 +356,7 @@ var f8: (x: number) => any = x => { // should be (x: number) => Base
|
|||
var f9: (x: number) => any = x => { // should be (x: number) => Base
|
||||
>f9 : (x: number) => any
|
||||
>x : number
|
||||
>x => { // should be (x: number) => Base return new Base(); return new Derived(); return new Derived2();} : (x: number) => Base | Derived | Derived2
|
||||
>x => { // should be (x: number) => Base return new Base(); return new Derived(); return new Derived2();} : (x: number) => Base
|
||||
>x : number
|
||||
|
||||
return new Base();
|
||||
|
|
|
@ -2125,8 +2125,8 @@ var x216 = <Genric<Base>>{ func: n => { return [d1, d2]; } };
|
|||
>d2 : Derived2
|
||||
|
||||
var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] };
|
||||
>x217 : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>(<() => Base[]>undefined) || function() { return [d1, d2] } : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>x217 : () => Base[]
|
||||
>(<() => Base[]>undefined) || function() { return [d1, d2] } : () => Base[]
|
||||
>(<() => Base[]>undefined) : () => Base[]
|
||||
><() => Base[]>undefined : () => Base[]
|
||||
>Base : Base
|
||||
|
@ -2137,8 +2137,8 @@ var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] };
|
|||
>d2 : Derived2
|
||||
|
||||
var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] };
|
||||
>x218 : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>(<() => Base[]>undefined) || function named() { return [d1, d2] } : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>x218 : () => Base[]
|
||||
>(<() => Base[]>undefined) || function named() { return [d1, d2] } : () => Base[]
|
||||
>(<() => Base[]>undefined) : () => Base[]
|
||||
><() => Base[]>undefined : () => Base[]
|
||||
>Base : Base
|
||||
|
@ -2150,8 +2150,8 @@ var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] };
|
|||
>d2 : Derived2
|
||||
|
||||
var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] };
|
||||
>x219 : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>(<{ (): Base[]; }>undefined) || function() { return [d1, d2] } : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>x219 : () => Base[]
|
||||
>(<{ (): Base[]; }>undefined) || function() { return [d1, d2] } : () => Base[]
|
||||
>(<{ (): Base[]; }>undefined) : () => Base[]
|
||||
><{ (): Base[]; }>undefined : () => Base[]
|
||||
>Base : Base
|
||||
|
@ -2162,8 +2162,8 @@ var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] };
|
|||
>d2 : Derived2
|
||||
|
||||
var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] };
|
||||
>x220 : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>(<{ (): Base[]; }>undefined) || function named() { return [d1, d2] } : (() => Base[]) | (() => (Derived1 | Derived2)[])
|
||||
>x220 : () => Base[]
|
||||
>(<{ (): Base[]; }>undefined) || function named() { return [d1, d2] } : () => Base[]
|
||||
>(<{ (): Base[]; }>undefined) : () => Base[]
|
||||
><{ (): Base[]; }>undefined : () => Base[]
|
||||
>Base : Base
|
||||
|
@ -2175,8 +2175,8 @@ var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] };
|
|||
>d2 : Derived2
|
||||
|
||||
var x221 = (<Base[]>undefined) || [d1, d2];
|
||||
>x221 : Base[] | (Derived1 | Derived2)[]
|
||||
>(<Base[]>undefined) || [d1, d2] : Base[] | (Derived1 | Derived2)[]
|
||||
>x221 : Base[]
|
||||
>(<Base[]>undefined) || [d1, d2] : Base[]
|
||||
>(<Base[]>undefined) : Base[]
|
||||
><Base[]>undefined : Base[]
|
||||
>Base : Base
|
||||
|
@ -2186,8 +2186,8 @@ var x221 = (<Base[]>undefined) || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x222 = (<Array<Base>>undefined) || [d1, d2];
|
||||
>x222 : Base[] | (Derived1 | Derived2)[]
|
||||
>(<Array<Base>>undefined) || [d1, d2] : Base[] | (Derived1 | Derived2)[]
|
||||
>x222 : Base[]
|
||||
>(<Array<Base>>undefined) || [d1, d2] : Base[]
|
||||
>(<Array<Base>>undefined) : Base[]
|
||||
><Array<Base>>undefined : Base[]
|
||||
>Array : T[]
|
||||
|
@ -2198,8 +2198,8 @@ var x222 = (<Array<Base>>undefined) || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2];
|
||||
>x223 : { [n: number]: Base; } | (Derived1 | Derived2)[]
|
||||
>(<{ [n: number]: Base; }>undefined) || [d1, d2] : { [n: number]: Base; } | (Derived1 | Derived2)[]
|
||||
>x223 : { [n: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) || [d1, d2] : { [n: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) : { [n: number]: Base; }
|
||||
><{ [n: number]: Base; }>undefined : { [n: number]: Base; }
|
||||
>n : number
|
||||
|
@ -2210,8 +2210,8 @@ var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] };
|
||||
>x224 : { n: Base[]; } | { n: (Derived1 | Derived2)[]; }
|
||||
>(<{n: Base[]; } >undefined) || { n: [d1, d2] } : { n: Base[]; } | { n: (Derived1 | Derived2)[]; }
|
||||
>x224 : { n: Base[]; }
|
||||
>(<{n: Base[]; } >undefined) || { n: [d1, d2] } : { n: Base[]; }
|
||||
>(<{n: Base[]; } >undefined) : { n: Base[]; }
|
||||
><{n: Base[]; } >undefined : { n: Base[]; }
|
||||
>n : Base[]
|
||||
|
|
|
@ -21,14 +21,14 @@ var c = [1, '', null]; // {}[]
|
|||
>null : null
|
||||
|
||||
var d = [{}, 1]; // {}[]
|
||||
>d : ({} | number)[]
|
||||
>[{}, 1] : ({} | number)[]
|
||||
>d : {}[]
|
||||
>[{}, 1] : {}[]
|
||||
>{} : {}
|
||||
>1 : number
|
||||
|
||||
var e = [{}, Object]; // {}[]
|
||||
>e : ({} | ObjectConstructor)[]
|
||||
>[{}, Object] : ({} | ObjectConstructor)[]
|
||||
>e : {}[]
|
||||
>[{}, Object] : {}[]
|
||||
>{} : {}
|
||||
>Object : ObjectConstructor
|
||||
|
||||
|
@ -88,16 +88,16 @@ var k = [() => 1, () => 1]; // { (): number }[]
|
|||
>1 : number
|
||||
|
||||
var l = [() => 1, () => null]; // { (): any }[]
|
||||
>l : ((() => number) | (() => any))[]
|
||||
>[() => 1, () => null] : ((() => number) | (() => any))[]
|
||||
>l : (() => any)[]
|
||||
>[() => 1, () => null] : (() => any)[]
|
||||
>() => 1 : () => number
|
||||
>1 : number
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
|
||||
var m = [() => 1, () => '', () => null]; // { (): any }[]
|
||||
>m : ((() => number) | (() => string) | (() => any))[]
|
||||
>[() => 1, () => '', () => null] : ((() => number) | (() => string) | (() => any))[]
|
||||
>m : (() => any)[]
|
||||
>[() => 1, () => '', () => null] : (() => any)[]
|
||||
>() => 1 : () => number
|
||||
>1 : number
|
||||
>() => '' : () => string
|
||||
|
@ -169,8 +169,8 @@ module Derived {
|
|||
>derived : Derived
|
||||
|
||||
var j = [() => base, () => derived]; // { {}: Base }
|
||||
>j : ((() => Base) | (() => Derived))[]
|
||||
>[() => base, () => derived] : ((() => Base) | (() => Derived))[]
|
||||
>j : (() => Base)[]
|
||||
>[() => base, () => derived] : (() => Base)[]
|
||||
>() => base : () => Base
|
||||
>base : Base
|
||||
>() => derived : () => Derived
|
||||
|
@ -185,16 +185,16 @@ module Derived {
|
|||
>1 : number
|
||||
|
||||
var l = [() => base, () => null]; // { (): any }[]
|
||||
>l : ((() => Base) | (() => any))[]
|
||||
>[() => base, () => null] : ((() => Base) | (() => any))[]
|
||||
>l : (() => any)[]
|
||||
>[() => base, () => null] : (() => any)[]
|
||||
>() => base : () => Base
|
||||
>base : Base
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
|
||||
var m = [() => base, () => derived, () => null]; // { (): any }[]
|
||||
>m : ((() => Base) | (() => Derived) | (() => any))[]
|
||||
>[() => base, () => derived, () => null] : ((() => Base) | (() => Derived) | (() => any))[]
|
||||
>m : (() => any)[]
|
||||
>[() => base, () => derived, () => null] : (() => any)[]
|
||||
>() => base : () => Base
|
||||
>base : Base
|
||||
>() => derived : () => Derived
|
||||
|
@ -203,8 +203,8 @@ module Derived {
|
|||
>null : null
|
||||
|
||||
var n = [[() => base], [() => derived]]; // { (): Base }[]
|
||||
>n : ((() => Base)[] | (() => Derived)[])[]
|
||||
>[[() => base], [() => derived]] : ((() => Base)[] | (() => Derived)[])[]
|
||||
>n : (() => Base)[][]
|
||||
>[[() => base], [() => derived]] : (() => Base)[][]
|
||||
>[() => base] : (() => Base)[]
|
||||
>() => base : () => Base
|
||||
>base : Base
|
||||
|
@ -219,8 +219,8 @@ module Derived {
|
|||
>derived2 : Derived2
|
||||
|
||||
var p = [derived, derived2, base]; // Base[]
|
||||
>p : (Derived | Derived2 | Base)[]
|
||||
>[derived, derived2, base] : (Derived | Derived2 | Base)[]
|
||||
>p : Base[]
|
||||
>[derived, derived2, base] : Base[]
|
||||
>derived : Derived
|
||||
>derived2 : Derived2
|
||||
>base : Base
|
||||
|
@ -310,8 +310,8 @@ function foo<T, U>(t: T, u: U) {
|
|||
>u : U
|
||||
|
||||
var f = [() => t, () => u, () => null]; // { (): any }[]
|
||||
>f : ((() => T) | (() => U) | (() => any))[]
|
||||
>[() => t, () => u, () => null] : ((() => T) | (() => U) | (() => any))[]
|
||||
>f : (() => any)[]
|
||||
>[() => t, () => u, () => null] : (() => any)[]
|
||||
>() => t : () => T
|
||||
>t : T
|
||||
>() => u : () => U
|
||||
|
@ -364,8 +364,8 @@ function foo2<T extends Base, U extends Derived>(t: T, u: U) {
|
|||
>u : U
|
||||
|
||||
var f = [() => t, () => u, () => null]; // { (): any }[]
|
||||
>f : ((() => T) | (() => U) | (() => any))[]
|
||||
>[() => t, () => u, () => null] : ((() => T) | (() => U) | (() => any))[]
|
||||
>f : (() => any)[]
|
||||
>[() => t, () => u, () => null] : (() => any)[]
|
||||
>() => t : () => T
|
||||
>t : T
|
||||
>() => u : () => U
|
||||
|
@ -374,8 +374,8 @@ function foo2<T extends Base, U extends Derived>(t: T, u: U) {
|
|||
>null : null
|
||||
|
||||
var g = [t, base]; // Base[]
|
||||
>g : (T | Base)[]
|
||||
>[t, base] : (T | Base)[]
|
||||
>g : Base[]
|
||||
>[t, base] : Base[]
|
||||
>t : T
|
||||
>base : Base
|
||||
|
||||
|
@ -386,14 +386,14 @@ function foo2<T extends Base, U extends Derived>(t: T, u: U) {
|
|||
>derived : Derived
|
||||
|
||||
var i = [u, base]; // Base[]
|
||||
>i : (U | Base)[]
|
||||
>[u, base] : (U | Base)[]
|
||||
>i : Base[]
|
||||
>[u, base] : Base[]
|
||||
>u : U
|
||||
>base : Base
|
||||
|
||||
var j = [u, derived]; // Derived[]
|
||||
>j : (U | Derived)[]
|
||||
>[u, derived] : (U | Derived)[]
|
||||
>j : Derived[]
|
||||
>[u, derived] : Derived[]
|
||||
>u : U
|
||||
>derived : Derived
|
||||
}
|
||||
|
@ -442,8 +442,8 @@ function foo3<T extends Derived, U extends Derived>(t: T, u: U) {
|
|||
>u : U
|
||||
|
||||
var f = [() => t, () => u, () => null]; // { (): any }[]
|
||||
>f : ((() => T) | (() => U) | (() => any))[]
|
||||
>[() => t, () => u, () => null] : ((() => T) | (() => U) | (() => any))[]
|
||||
>f : (() => any)[]
|
||||
>[() => t, () => u, () => null] : (() => any)[]
|
||||
>() => t : () => T
|
||||
>t : T
|
||||
>() => u : () => U
|
||||
|
@ -452,26 +452,26 @@ function foo3<T extends Derived, U extends Derived>(t: T, u: U) {
|
|||
>null : null
|
||||
|
||||
var g = [t, base]; // Base[]
|
||||
>g : (T | Base)[]
|
||||
>[t, base] : (T | Base)[]
|
||||
>g : Base[]
|
||||
>[t, base] : Base[]
|
||||
>t : T
|
||||
>base : Base
|
||||
|
||||
var h = [t, derived]; // Derived[]
|
||||
>h : (T | Derived)[]
|
||||
>[t, derived] : (T | Derived)[]
|
||||
>h : Derived[]
|
||||
>[t, derived] : Derived[]
|
||||
>t : T
|
||||
>derived : Derived
|
||||
|
||||
var i = [u, base]; // Base[]
|
||||
>i : (U | Base)[]
|
||||
>[u, base] : (U | Base)[]
|
||||
>i : Base[]
|
||||
>[u, base] : Base[]
|
||||
>u : U
|
||||
>base : Base
|
||||
|
||||
var j = [u, derived]; // Derived[]
|
||||
>j : (U | Derived)[]
|
||||
>[u, derived] : (U | Derived)[]
|
||||
>j : Derived[]
|
||||
>[u, derived] : Derived[]
|
||||
>u : U
|
||||
>derived : Derived
|
||||
}
|
||||
|
@ -520,8 +520,8 @@ function foo4<T extends Base, U extends Base>(t: T, u: U) {
|
|||
>u : U
|
||||
|
||||
var f = [() => t, () => u, () => null]; // { (): any }[]
|
||||
>f : ((() => T) | (() => U) | (() => any))[]
|
||||
>[() => t, () => u, () => null] : ((() => T) | (() => U) | (() => any))[]
|
||||
>f : (() => any)[]
|
||||
>[() => t, () => u, () => null] : (() => any)[]
|
||||
>() => t : () => T
|
||||
>t : T
|
||||
>() => u : () => U
|
||||
|
@ -530,8 +530,8 @@ function foo4<T extends Base, U extends Base>(t: T, u: U) {
|
|||
>null : null
|
||||
|
||||
var g = [t, base]; // Base[]
|
||||
>g : (T | Base)[]
|
||||
>[t, base] : (T | Base)[]
|
||||
>g : Base[]
|
||||
>[t, base] : Base[]
|
||||
>t : T
|
||||
>base : Base
|
||||
|
||||
|
@ -542,8 +542,8 @@ function foo4<T extends Base, U extends Base>(t: T, u: U) {
|
|||
>derived : Derived
|
||||
|
||||
var i = [u, base]; // Base[]
|
||||
>i : (U | Base)[]
|
||||
>[u, base] : (U | Base)[]
|
||||
>i : Base[]
|
||||
>[u, base] : Base[]
|
||||
>u : U
|
||||
>base : Base
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type
|
|||
Types of property 'p1' are incompatible.
|
||||
Type '() => string' is not assignable to type '(s: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(49,5): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(49,7): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'.
|
||||
Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(66,47): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'.
|
||||
Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => number' is not assignable to type '() => any'.
|
||||
|
@ -101,7 +101,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
|||
function of1(a: any) { return null; }
|
||||
|
||||
of1({ e: 0, f: 0 });
|
||||
~~~~~~~~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'.
|
||||
|
||||
|
@ -121,7 +121,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
|||
}
|
||||
|
||||
var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 };
|
||||
~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'.
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDec
|
|||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(40,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(43,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(46,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(47,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | C2 | D<string>)[]'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(47,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | D<string>)[]'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(50,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D<string>[]', but here has type 'D<number>[]'.
|
||||
tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts(53,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'.
|
||||
|
||||
|
@ -79,7 +79,7 @@ tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDec
|
|||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'.
|
||||
var arr = [new C(), new C2(), new D<string>()];
|
||||
~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | C2 | D<string>)[]'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '(C | D<string>)[]'.
|
||||
|
||||
var arr2 = [new D<string>()];
|
||||
var arr2 = new Array<D<number>>();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts(6,5): error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts(6,33): error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'.
|
||||
Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'.
|
||||
|
||||
|
@ -10,7 +10,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrE
|
|||
// operand types.
|
||||
|
||||
var r: { a: string } = { a: '', b: 123 } || { a: '', b: true };
|
||||
~
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'.
|
|
@ -187,8 +187,8 @@ var rc5 = a5 || a3; // void || number is void | number
|
|||
>a3 : number
|
||||
|
||||
var rc6 = a6 || a3; // enum || number is number
|
||||
>rc6 : E | number
|
||||
>a6 || a3 : E | number
|
||||
>rc6 : number
|
||||
>a6 || a3 : number
|
||||
>a6 : E
|
||||
>a3 : number
|
||||
|
||||
|
@ -349,8 +349,8 @@ var rg2 = a2 || a6; // boolean || enum is boolean | enum
|
|||
>a6 : E
|
||||
|
||||
var rg3 = a3 || a6; // number || enum is number
|
||||
>rg3 : number | E
|
||||
>a3 || a6 : number | E
|
||||
>rg3 : number
|
||||
>a3 || a6 : number
|
||||
>a3 : number
|
||||
>a6 : E
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ function fn3<T extends { a: string; b: string }, U extends { a: string; b: numbe
|
|||
>u : U
|
||||
|
||||
var r3 = t || { a: '' };
|
||||
>r3 : T | { a: string; }
|
||||
>t || { a: '' } : T | { a: string; }
|
||||
>r3 : { a: string; }
|
||||
>t || { a: '' } : { a: string; }
|
||||
>t : T
|
||||
>{ a: '' } : { a: string; }
|
||||
>a : string
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(16,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(25,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(34,5): error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2322: Type '{ [x: number]: A | B | number; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2322: Type '{ [x: number]: A | number; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'A | B | number' is not assignable to type 'A'.
|
||||
Type 'A | number' is not assignable to type 'A'.
|
||||
Type 'number' is not assignable to type 'A'.
|
||||
|
||||
|
||||
|
@ -54,9 +54,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo
|
|||
// error
|
||||
var b: { [x: number]: A } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: A | B | number; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'.
|
||||
!!! error TS2322: Type '{ [x: number]: A | number; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'A | B | number' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'A | number' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'A'.
|
||||
1.0: new A(),
|
||||
2.0: new B(),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
|
||||
tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,27): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/objectLitStructuralTypeMismatch.ts (1 errors) ====
|
||||
// Shouldn't compile
|
||||
var x: { a: number; } = { b: 5 };
|
||||
~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'.
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(8,6): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'.
|
||||
Object literal may only specify known properties, and 'hello' does not exist in type 'I'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(10,17): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'.
|
||||
Object literal may only specify known properties, and 'what' does not exist in type 'I'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'.
|
||||
Property 'value' is missing in type '{ toString: (s: string) => string; }'.
|
||||
|
@ -18,12 +18,12 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error T
|
|||
function f2(args: I) { }
|
||||
|
||||
f2({ hello: 1 }) // error
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I'.
|
||||
f2({ value: '' }) // missing toString satisfied by Object's member
|
||||
f2({ value: '', what: 1 }) // missing toString satisfied by Object's member
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I'.
|
||||
f2({ toString: (s) => s }) // error, missing property value from ArgsString
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,6): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'.
|
||||
Object literal may only specify known properties, and 'hello' does not exist in type 'I2'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'.
|
||||
Property 'doStuff' is missing in type '{ value: string; }'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,17): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
|
||||
Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
|
||||
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,4): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
|
||||
Property 'value' is missing in type '{ toString: (s: any) => any; }'.
|
||||
|
@ -21,7 +21,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T
|
|||
function f2(args: I2) { }
|
||||
|
||||
f2({ hello: 1 })
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I2'.
|
||||
f2({ value: '' })
|
||||
|
@ -29,7 +29,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T
|
|||
!!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'.
|
||||
!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; }'.
|
||||
f2({ value: '', what: 1 })
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
|
||||
f2({ toString: (s) => s })
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: B | A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
@ -18,7 +18,7 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{
|
|||
|
||||
var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: B | A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
o1 = { x: c, 0: a }; // string indexer is any, number indexer is A
|
|
@ -31,7 +31,7 @@ var o1: { [s: string]: A;[n: number]: B; } = { x: a, 0: b }; // string indexer i
|
|||
>A : A
|
||||
>n : number
|
||||
>B : B
|
||||
>{ x: a, 0: b } : { [x: string]: A | B; [x: number]: B; 0: B; x: A; }
|
||||
>{ x: a, 0: b } : { [x: string]: A; [x: number]: B; 0: B; x: A; }
|
||||
>x : A
|
||||
>a : A
|
||||
>b : B
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(4,43): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'.
|
||||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,16): error TS1131: Property or signature expected.
|
||||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'.
|
||||
|
@ -16,7 +16,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr
|
|||
var name: string = "my name";
|
||||
|
||||
var person: { b: string; id: number } = { name, id }; // error
|
||||
~~~~~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'.
|
||||
var person1: { name, id }; // error: can't use short-hand property assignment in type position
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(4,43): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'.
|
||||
tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(5,79): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'.
|
||||
Types of property 'name' are incompatible.
|
||||
|
@ -16,7 +16,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr
|
|||
var name: string = "my name";
|
||||
|
||||
var person: { b: string; id: number } = { name, id }; // error
|
||||
~~~~~~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'.
|
||||
function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,5): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'.
|
||||
tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'.
|
||||
tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,5): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'.
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS234
|
|||
var v: B;
|
||||
|
||||
v({ s: "", n: 0 }).toLowerCase();
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'.
|
||||
|
||||
|
@ -35,6 +35,6 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS234
|
|||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'.
|
||||
|
||||
w({ s: "", n: 0 }).toLowerCase();
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'.
|
|
@ -149,8 +149,8 @@ var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10);
|
|||
>i : number
|
||||
>fun((Math.random() < 0.5 ? x => x : x => undefined), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? x => x : x => undefined) : ((x: number) => number) | ((x: number) => any)
|
||||
>Math.random() < 0.5 ? x => x : x => undefined : ((x: number) => number) | ((x: number) => any)
|
||||
>(Math.random() < 0.5 ? x => x : x => undefined) : (x: number) => any
|
||||
>Math.random() < 0.5 ? x => x : x => undefined : (x: number) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -169,8 +169,8 @@ var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10);
|
|||
>j : number
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : ((x: number) => number) | ((x: number) => any)
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : ((x: number) => number) | ((x: number) => any)
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => any
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -191,8 +191,8 @@ var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);
|
|||
>k : number
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : ((x: number) => number) | ((x: number) => any)
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : ((x: number) => number) | ((x: number) => any)
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => any
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -216,9 +216,9 @@ var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)
|
|||
>l : number
|
||||
>fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))) : ((x: number) => number) | ((x: number) => any)
|
||||
>(Math.random() < 0.5 ? ((x => x)) : ((x => undefined))) : ((x: number) => number) | ((x: number) => any)
|
||||
>Math.random() < 0.5 ? ((x => x)) : ((x => undefined)) : ((x: number) => number) | ((x: number) => any)
|
||||
>((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))) : (x: number) => any
|
||||
>(Math.random() < 0.5 ? ((x => x)) : ((x => undefined))) : (x: number) => any
|
||||
>Math.random() < 0.5 ? ((x => x)) : ((x => undefined)) : (x: number) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
|
|
@ -186,8 +186,8 @@ var i = fun((Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x
|
|||
>i : number
|
||||
>fun((Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined), 10) : number
|
||||
>fun : { <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, g: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>(Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -209,8 +209,8 @@ var j = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
|||
>j : number
|
||||
>fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)), 10) : number
|
||||
>fun : { <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, g: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -234,8 +234,8 @@ var k = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
|||
>k : number
|
||||
>fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)), x => { x<number>(undefined); return x; }, 10) : number
|
||||
>fun : { <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, g: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
@ -265,9 +265,9 @@ var l = fun(((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; }))
|
|||
>l : number
|
||||
>fun(((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))),((x => { x<number>(undefined); return x; })), 10) : number
|
||||
>fun : { <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; <T>(f: (x: <T>(p: T) => T) => <T>(p: T) => T, g: (x: <T>(p: T) => T) => <T>(p: T) => T, x: T): T; }
|
||||
>((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>(Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined))) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)) : ((x: <T>(p: T) => T) => <T>(p: T) => T) | ((x: <T>(p: T) => T) => any)
|
||||
>((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))) : (x: <T>(p: T) => T) => any
|
||||
>(Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined))) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
|
|
|
@ -22,9 +22,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
|||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(71,5): error TS2411: Property 'foo' of type '() => string' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(73,5): error TS2411: Property '"4.0"' of type 'number' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(74,5): error TS2411: Property 'f' of type 'MyString' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: string]: string | number | (() => void) | MyString | (() => string); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: string]: string | number | (() => void) | MyString; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string | number | (() => void) | MyString | (() => string)' is not assignable to type 'string'.
|
||||
Type 'string | number | (() => void) | MyString' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(90,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(93,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
@ -160,9 +160,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
|||
// error
|
||||
var b: { [x: string]: string; } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: string | number | (() => void) | MyString | (() => string); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: string | number | (() => void) | MyString; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'string | number | (() => void) | MyString | (() => string)' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'string | number | (() => void) | MyString' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a: '',
|
||||
b: 1,
|
||||
|
|
|
@ -4,11 +4,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
|||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(24,5): error TS2411: Property 'd' of type 'string' is not assignable to string index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(31,5): error TS2411: Property 'c' of type 'number' is not assignable to string index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(32,5): error TS2411: Property 'd' of type 'string' is not assignable to string index type 'A'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(36,5): error TS2322: Type '{ [x: string]: typeof A | typeof B; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts(36,5): error TS2322: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'typeof A | typeof B' is not assignable to type 'A'.
|
||||
Type 'typeof A' is not assignable to type 'A'.
|
||||
Property 'foo' is missing in type 'typeof A'.
|
||||
Type 'typeof A' is not assignable to type 'A'.
|
||||
Property 'foo' is missing in type 'typeof A'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts (7 errors) ====
|
||||
|
@ -61,11 +60,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
|||
// error
|
||||
var b: { [x: string]: A } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: typeof A | typeof B; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: typeof A; a: typeof A; b: typeof B; }' is not assignable to type '{ [x: string]: A; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'typeof A | typeof B' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'typeof A' is not assignable to type 'A'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'typeof A'.
|
||||
!!! error TS2322: Type 'typeof A' is not assignable to type 'A'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'typeof A'.
|
||||
a: A,
|
||||
b: B
|
||||
}
|
|
@ -331,14 +331,14 @@ var r1 = foo1(r1arg1); // any, return types are not subtype of first overload
|
|||
>r1arg1 : <T>(x: T) => T[]
|
||||
|
||||
var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions
|
||||
>r1a : (((x: number) => number[]) | (<T>(x: T) => T[]))[]
|
||||
>[r1arg2, r1arg1] : (((x: number) => number[]) | (<T>(x: T) => T[]))[]
|
||||
>r1a : (<T>(x: T) => T[])[]
|
||||
>[r1arg2, r1arg1] : (<T>(x: T) => T[])[]
|
||||
>r1arg2 : (x: number) => number[]
|
||||
>r1arg1 : <T>(x: T) => T[]
|
||||
|
||||
var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions
|
||||
>r1b : ((<T>(x: T) => T[]) | ((x: number) => number[]))[]
|
||||
>[r1arg1, r1arg2] : ((<T>(x: T) => T[]) | ((x: number) => number[]))[]
|
||||
>r1b : (<T>(x: T) => T[])[]
|
||||
>[r1arg1, r1arg2] : (<T>(x: T) => T[])[]
|
||||
>r1arg1 : <T>(x: T) => T[]
|
||||
>r1arg2 : (x: number) => number[]
|
||||
|
||||
|
@ -365,14 +365,14 @@ var r2 = foo2(r2arg1);
|
|||
>r2arg1 : <T>(x: T) => string[]
|
||||
|
||||
var r2a = [r2arg1, r2arg2];
|
||||
>r2a : ((<T>(x: T) => string[]) | ((x: number) => string[]))[]
|
||||
>[r2arg1, r2arg2] : ((<T>(x: T) => string[]) | ((x: number) => string[]))[]
|
||||
>r2a : (<T>(x: T) => string[])[]
|
||||
>[r2arg1, r2arg2] : (<T>(x: T) => string[])[]
|
||||
>r2arg1 : <T>(x: T) => string[]
|
||||
>r2arg2 : (x: number) => string[]
|
||||
|
||||
var r2b = [r2arg2, r2arg1];
|
||||
>r2b : (((x: number) => string[]) | (<T>(x: T) => string[]))[]
|
||||
>[r2arg2, r2arg1] : (((x: number) => string[]) | (<T>(x: T) => string[]))[]
|
||||
>r2b : ((x: number) => string[])[]
|
||||
>[r2arg2, r2arg1] : ((x: number) => string[])[]
|
||||
>r2arg2 : (x: number) => string[]
|
||||
>r2arg1 : <T>(x: T) => string[]
|
||||
|
||||
|
@ -396,14 +396,14 @@ var r3 = foo3(r3arg1);
|
|||
>r3arg1 : <T>(x: T) => T
|
||||
|
||||
var r3a = [r3arg1, r3arg2];
|
||||
>r3a : ((<T>(x: T) => T) | ((x: number) => void))[]
|
||||
>[r3arg1, r3arg2] : ((<T>(x: T) => T) | ((x: number) => void))[]
|
||||
>r3a : (<T>(x: T) => T)[]
|
||||
>[r3arg1, r3arg2] : (<T>(x: T) => T)[]
|
||||
>r3arg1 : <T>(x: T) => T
|
||||
>r3arg2 : (x: number) => void
|
||||
|
||||
var r3b = [r3arg2, r3arg1];
|
||||
>r3b : (((x: number) => void) | (<T>(x: T) => T))[]
|
||||
>[r3arg2, r3arg1] : (((x: number) => void) | (<T>(x: T) => T))[]
|
||||
>r3b : ((x: number) => void)[]
|
||||
>[r3arg2, r3arg1] : ((x: number) => void)[]
|
||||
>r3arg2 : (x: number) => void
|
||||
>r3arg1 : <T>(x: T) => T
|
||||
|
||||
|
@ -432,14 +432,14 @@ var r4 = foo4(r4arg1); // any
|
|||
>r4arg1 : <T, U>(x: T, y: U) => T
|
||||
|
||||
var r4a = [r4arg1, r4arg2];
|
||||
>r4a : ((<T, U>(x: T, y: U) => T) | ((x: string, y: number) => string))[]
|
||||
>[r4arg1, r4arg2] : ((<T, U>(x: T, y: U) => T) | ((x: string, y: number) => string))[]
|
||||
>r4a : (<T, U>(x: T, y: U) => T)[]
|
||||
>[r4arg1, r4arg2] : (<T, U>(x: T, y: U) => T)[]
|
||||
>r4arg1 : <T, U>(x: T, y: U) => T
|
||||
>r4arg2 : (x: string, y: number) => string
|
||||
|
||||
var r4b = [r4arg2, r4arg1];
|
||||
>r4b : (((x: string, y: number) => string) | (<T, U>(x: T, y: U) => T))[]
|
||||
>[r4arg2, r4arg1] : (((x: string, y: number) => string) | (<T, U>(x: T, y: U) => T))[]
|
||||
>r4b : (<T, U>(x: T, y: U) => T)[]
|
||||
>[r4arg2, r4arg1] : (<T, U>(x: T, y: U) => T)[]
|
||||
>r4arg2 : (x: string, y: number) => string
|
||||
>r4arg1 : <T, U>(x: T, y: U) => T
|
||||
|
||||
|
@ -470,14 +470,14 @@ var r5 = foo5(r5arg1); // any
|
|||
>r5arg1 : <T, U>(x: (arg: T) => U) => T
|
||||
|
||||
var r5a = [r5arg1, r5arg2];
|
||||
>r5a : ((<T, U>(x: (arg: T) => U) => T) | ((x: (arg: string) => number) => string))[]
|
||||
>[r5arg1, r5arg2] : ((<T, U>(x: (arg: T) => U) => T) | ((x: (arg: string) => number) => string))[]
|
||||
>r5a : (<T, U>(x: (arg: T) => U) => T)[]
|
||||
>[r5arg1, r5arg2] : (<T, U>(x: (arg: T) => U) => T)[]
|
||||
>r5arg1 : <T, U>(x: (arg: T) => U) => T
|
||||
>r5arg2 : (x: (arg: string) => number) => string
|
||||
|
||||
var r5b = [r5arg2, r5arg1];
|
||||
>r5b : (((x: (arg: string) => number) => string) | (<T, U>(x: (arg: T) => U) => T))[]
|
||||
>[r5arg2, r5arg1] : (((x: (arg: string) => number) => string) | (<T, U>(x: (arg: T) => U) => T))[]
|
||||
>r5b : (<T, U>(x: (arg: T) => U) => T)[]
|
||||
>[r5arg2, r5arg1] : (<T, U>(x: (arg: T) => U) => T)[]
|
||||
>r5arg2 : (x: (arg: string) => number) => string
|
||||
>r5arg1 : <T, U>(x: (arg: T) => U) => T
|
||||
|
||||
|
@ -514,14 +514,14 @@ var r6 = foo6(r6arg1); // any
|
|||
>r6arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
|
||||
var r6a = [r6arg1, r6arg2];
|
||||
>r6a : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => T) | ((x: (arg: Base) => Derived) => Base))[]
|
||||
>[r6arg1, r6arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => T) | ((x: (arg: Base) => Derived) => Base))[]
|
||||
>r6a : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>[r6arg1, r6arg2] : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>r6arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
>r6arg2 : (x: (arg: Base) => Derived) => Base
|
||||
|
||||
var r6b = [r6arg2, r6arg1];
|
||||
>r6b : (((x: (arg: Base) => Derived) => Base) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => T))[]
|
||||
>[r6arg2, r6arg1] : (((x: (arg: Base) => Derived) => Base) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => T))[]
|
||||
>r6b : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>[r6arg2, r6arg1] : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>r6arg2 : (x: (arg: Base) => Derived) => Base
|
||||
>r6arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
|
||||
|
@ -564,14 +564,14 @@ var r7 = foo7(r7arg1); // any
|
|||
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
|
||||
|
||||
var r7a = [r7arg1, r7arg2];
|
||||
>r7a : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U) | ((x: (arg: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>[r7arg1, r7arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U) | ((x: (arg: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>r7a : (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U)[]
|
||||
>[r7arg1, r7arg2] : (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U)[]
|
||||
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
|
||||
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
|
||||
|
||||
var r7b = [r7arg2, r7arg1];
|
||||
>r7b : (((x: (arg: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U))[]
|
||||
>[r7arg2, r7arg1] : (((x: (arg: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U))[]
|
||||
>r7b : (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U)[]
|
||||
>[r7arg2, r7arg1] : (<T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U)[]
|
||||
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
|
||||
>r7arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U) => (r: T) => U
|
||||
|
||||
|
@ -622,14 +622,14 @@ var r8 = foo8(r8arg1); // any
|
|||
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
|
||||
|
||||
var r8a = [r8arg1, r8arg2];
|
||||
>r8a : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>[r8arg1, r8arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>r8a : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
|
||||
>[r8arg1, r8arg2] : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
|
||||
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
|
||||
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
|
||||
|
||||
var r8b = [r8arg2, r8arg1];
|
||||
>r8b : (((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U))[]
|
||||
>[r8arg2, r8arg1] : (((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U))[]
|
||||
>r8b : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
|
||||
>[r8arg2, r8arg1] : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
|
||||
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
|
||||
>r8arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
|
||||
|
||||
|
@ -681,14 +681,14 @@ var r9 = foo9(r9arg1); // any
|
|||
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
|
||||
|
||||
var r9a = [r9arg1, r9arg2];
|
||||
>r9a : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>[r9arg1, r9arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
|
||||
>r9a : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
|
||||
>[r9arg1, r9arg2] : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
|
||||
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
|
||||
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
|
||||
|
||||
var r9b = [r9arg2, r9arg1];
|
||||
>r9b : (((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U))[]
|
||||
>[r9arg2, r9arg1] : (((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived) | (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U))[]
|
||||
>r9b : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
|
||||
>[r9arg2, r9arg1] : (<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
|
||||
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
|
||||
>r9arg1 : <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
|
||||
|
||||
|
@ -719,14 +719,14 @@ var r10 = foo10(r10arg1); // any
|
|||
>r10arg1 : <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r10a = [r10arg1, r10arg2];
|
||||
>r10a : ((<T extends Derived>(...x: T[]) => T) | ((...x: Derived[]) => Derived))[]
|
||||
>[r10arg1, r10arg2] : ((<T extends Derived>(...x: T[]) => T) | ((...x: Derived[]) => Derived))[]
|
||||
>r10a : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>[r10arg1, r10arg2] : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>r10arg1 : <T extends Derived>(...x: T[]) => T
|
||||
>r10arg2 : (...x: Derived[]) => Derived
|
||||
|
||||
var r10b = [r10arg2, r10arg1];
|
||||
>r10b : (((...x: Derived[]) => Derived) | (<T extends Derived>(...x: T[]) => T))[]
|
||||
>[r10arg2, r10arg1] : (((...x: Derived[]) => Derived) | (<T extends Derived>(...x: T[]) => T))[]
|
||||
>r10b : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>[r10arg2, r10arg1] : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>r10arg2 : (...x: Derived[]) => Derived
|
||||
>r10arg1 : <T extends Derived>(...x: T[]) => T
|
||||
|
||||
|
@ -760,14 +760,14 @@ var r11 = foo11(r11arg1); // any
|
|||
>r11arg1 : <T extends Base>(x: T, y: T) => T
|
||||
|
||||
var r11a = [r11arg1, r11arg2];
|
||||
>r11a : ((<T extends Base>(x: T, y: T) => T) | ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>[r11arg1, r11arg2] : ((<T extends Base>(x: T, y: T) => T) | ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>r11a : (<T extends Base>(x: T, y: T) => T)[]
|
||||
>[r11arg1, r11arg2] : (<T extends Base>(x: T, y: T) => T)[]
|
||||
>r11arg1 : <T extends Base>(x: T, y: T) => T
|
||||
>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
|
||||
var r11b = [r11arg2, r11arg1];
|
||||
>r11b : (((x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (<T extends Base>(x: T, y: T) => T))[]
|
||||
>[r11arg2, r11arg1] : (((x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (<T extends Base>(x: T, y: T) => T))[]
|
||||
>r11b : (<T extends Base>(x: T, y: T) => T)[]
|
||||
>[r11arg2, r11arg1] : (<T extends Base>(x: T, y: T) => T)[]
|
||||
>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
>r11arg1 : <T extends Base>(x: T, y: T) => T
|
||||
|
||||
|
@ -808,14 +808,14 @@ var r12 = foo12(r12arg1); // any
|
|||
>r12arg1 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
|
||||
var r12a = [r12arg1, r12arg2];
|
||||
>r12a : ((<T extends Base[]>(x: Base[], y: T) => Derived[]) | ((x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>[r12arg1, r12arg2] : ((<T extends Base[]>(x: Base[], y: T) => Derived[]) | ((x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>r12a : (<T extends Base[]>(x: Base[], y: T) => Derived[])[]
|
||||
>[r12arg1, r12arg2] : (<T extends Base[]>(x: Base[], y: T) => Derived[])[]
|
||||
>r12arg1 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>r12arg2 : (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r12b = [r12arg2, r12arg1];
|
||||
>r12b : (((x: Base[], y: Derived2[]) => Derived[]) | (<T extends Base[]>(x: Base[], y: T) => Derived[]))[]
|
||||
>[r12arg2, r12arg1] : (((x: Base[], y: Derived2[]) => Derived[]) | (<T extends Base[]>(x: Base[], y: T) => Derived[]))[]
|
||||
>r12b : ((x: Base[], y: Derived2[]) => Derived[])[]
|
||||
>[r12arg2, r12arg1] : ((x: Base[], y: Derived2[]) => Derived[])[]
|
||||
>r12arg2 : (x: Base[], y: Derived2[]) => Derived[]
|
||||
>r12arg1 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
|
||||
|
@ -853,14 +853,14 @@ var r13 = foo13(r13arg1); // any
|
|||
>r13arg1 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
|
||||
var r13a = [r13arg1, r13arg2];
|
||||
>r13a : ((<T extends Derived[]>(x: Base[], y: T) => T) | ((x: Base[], y: Derived[]) => Derived[]))[]
|
||||
>[r13arg1, r13arg2] : ((<T extends Derived[]>(x: Base[], y: T) => T) | ((x: Base[], y: Derived[]) => Derived[]))[]
|
||||
>r13a : (<T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>[r13arg1, r13arg2] : (<T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>r13arg1 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>r13arg2 : (x: Base[], y: Derived[]) => Derived[]
|
||||
|
||||
var r13b = [r13arg2, r13arg1];
|
||||
>r13b : (((x: Base[], y: Derived[]) => Derived[]) | (<T extends Derived[]>(x: Base[], y: T) => T))[]
|
||||
>[r13arg2, r13arg1] : (((x: Base[], y: Derived[]) => Derived[]) | (<T extends Derived[]>(x: Base[], y: T) => T))[]
|
||||
>r13b : (<T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>[r13arg2, r13arg1] : (<T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>r13arg2 : (x: Base[], y: Derived[]) => Derived[]
|
||||
>r13arg1 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
|
||||
|
@ -894,14 +894,14 @@ var r14 = foo14(r14arg1); // any
|
|||
>r14arg1 : <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r14a = [r14arg1, r14arg2];
|
||||
>r14a : ((<T>(x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[]
|
||||
>[r14arg1, r14arg2] : ((<T>(x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => Object))[]
|
||||
>r14a : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r14arg1, r14arg2] : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>r14arg1 : <T>(x: { a: T; b: T; }) => T
|
||||
>r14arg2 : (x: { a: string; b: number; }) => Object
|
||||
|
||||
var r14b = [r14arg2, r14arg1];
|
||||
>r14b : (((x: { a: string; b: number; }) => Object) | (<T>(x: { a: T; b: T; }) => T))[]
|
||||
>[r14arg2, r14arg1] : (((x: { a: string; b: number; }) => Object) | (<T>(x: { a: T; b: T; }) => T))[]
|
||||
>r14b : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r14arg2, r14arg1] : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>r14arg2 : (x: { a: string; b: number; }) => Object
|
||||
>r14arg1 : <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ module Errors {
|
|||
>null : null
|
||||
|
||||
var r1a = [(x: number) => [''], <T, U>(x: T) => <U[]>null];
|
||||
>r1a : (((x: number) => string[]) | (<T, U>(x: T) => U[]))[]
|
||||
>[(x: number) => [''], <T, U>(x: T) => <U[]>null] : (((x: number) => string[]) | (<T, U>(x: T) => U[]))[]
|
||||
>r1a : (<T, U>(x: T) => U[])[]
|
||||
>[(x: number) => [''], <T, U>(x: T) => <U[]>null] : (<T, U>(x: T) => U[])[]
|
||||
>(x: number) => [''] : (x: number) => string[]
|
||||
>x : number
|
||||
>[''] : string[]
|
||||
|
@ -235,8 +235,8 @@ module Errors {
|
|||
>null : null
|
||||
|
||||
var r1b = [<T, U>(x: T) => <U[]>null, (x: number) => ['']];
|
||||
>r1b : ((<T, U>(x: T) => U[]) | ((x: number) => string[]))[]
|
||||
>[<T, U>(x: T) => <U[]>null, (x: number) => ['']] : ((<T, U>(x: T) => U[]) | ((x: number) => string[]))[]
|
||||
>r1b : (<T, U>(x: T) => U[])[]
|
||||
>[<T, U>(x: T) => <U[]>null, (x: number) => ['']] : (<T, U>(x: T) => U[])[]
|
||||
><T, U>(x: T) => <U[]>null : <T, U>(x: T) => U[]
|
||||
>T : T
|
||||
>U : U
|
||||
|
@ -291,14 +291,14 @@ module Errors {
|
|||
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
|
||||
|
||||
var r2a = [r2arg2, r2arg];
|
||||
>r2a : (((x: (arg: Base) => Derived) => (r: Base) => Derived2) | (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V))[]
|
||||
>[r2arg2, r2arg] : (((x: (arg: Base) => Derived) => (r: Base) => Derived2) | (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V))[]
|
||||
>r2a : (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V)[]
|
||||
>[r2arg2, r2arg] : (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V)[]
|
||||
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
|
||||
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
|
||||
|
||||
var r2b = [r2arg, r2arg2];
|
||||
>r2b : ((<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V) | ((x: (arg: Base) => Derived) => (r: Base) => Derived2))[]
|
||||
>[r2arg, r2arg2] : ((<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V) | ((x: (arg: Base) => Derived) => (r: Base) => Derived2))[]
|
||||
>r2b : (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V)[]
|
||||
>[r2arg, r2arg2] : (<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V)[]
|
||||
>r2arg : <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V
|
||||
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
|
||||
|
||||
|
@ -387,14 +387,14 @@ module Errors {
|
|||
>r4arg : <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r4a = [r4arg2, r4arg];
|
||||
>r4a : (((...x: Base[]) => Base) | (<T extends Derived>(...x: T[]) => T))[]
|
||||
>[r4arg2, r4arg] : (((...x: Base[]) => Base) | (<T extends Derived>(...x: T[]) => T))[]
|
||||
>r4a : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>[r4arg2, r4arg] : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>r4arg2 : (...x: Base[]) => Base
|
||||
>r4arg : <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r4b = [r4arg, r4arg2];
|
||||
>r4b : ((<T extends Derived>(...x: T[]) => T) | ((...x: Base[]) => Base))[]
|
||||
>[r4arg, r4arg2] : ((<T extends Derived>(...x: T[]) => T) | ((...x: Base[]) => Base))[]
|
||||
>r4b : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>[r4arg, r4arg2] : (<T extends Derived>(...x: T[]) => T)[]
|
||||
>r4arg : <T extends Derived>(...x: T[]) => T
|
||||
>r4arg2 : (...x: Base[]) => Base
|
||||
|
||||
|
@ -430,14 +430,14 @@ module Errors {
|
|||
>r5arg : <T extends Derived>(x: T, y: T) => T
|
||||
|
||||
var r5a = [r5arg2, r5arg];
|
||||
>r5a : (((x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (<T extends Derived>(x: T, y: T) => T))[]
|
||||
>[r5arg2, r5arg] : (((x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (<T extends Derived>(x: T, y: T) => T))[]
|
||||
>r5a : (<T extends Derived>(x: T, y: T) => T)[]
|
||||
>[r5arg2, r5arg] : (<T extends Derived>(x: T, y: T) => T)[]
|
||||
>r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
>r5arg : <T extends Derived>(x: T, y: T) => T
|
||||
|
||||
var r5b = [r5arg, r5arg2];
|
||||
>r5b : ((<T extends Derived>(x: T, y: T) => T) | ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>[r5arg, r5arg2] : ((<T extends Derived>(x: T, y: T) => T) | ((x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>r5b : (<T extends Derived>(x: T, y: T) => T)[]
|
||||
>[r5arg, r5arg2] : (<T extends Derived>(x: T, y: T) => T)[]
|
||||
>r5arg : <T extends Derived>(x: T, y: T) => T
|
||||
>r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
|
||||
|
@ -478,14 +478,14 @@ module Errors {
|
|||
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r6a = [r6arg2, r6arg];
|
||||
>r6a : ((<T extends Derived2[]>(x: Base[], y: Base[]) => T) | ((x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>[r6arg2, r6arg] : ((<T extends Derived2[]>(x: Base[], y: Base[]) => T) | ((x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>r6a : (<T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>[r6arg2, r6arg] : (<T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>r6arg2 : <T extends Derived2[]>(x: Base[], y: Base[]) => T
|
||||
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r6b = [r6arg, r6arg2];
|
||||
>r6b : (((x: Base[], y: Derived2[]) => Derived[]) | (<T extends Derived2[]>(x: Base[], y: Base[]) => T))[]
|
||||
>[r6arg, r6arg2] : (((x: Base[], y: Derived2[]) => Derived[]) | (<T extends Derived2[]>(x: Base[], y: Base[]) => T))[]
|
||||
>r6b : (<T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>[r6arg, r6arg2] : (<T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
|
||||
>r6arg2 : <T extends Derived2[]>(x: Base[], y: Base[]) => T
|
||||
|
||||
|
@ -517,14 +517,14 @@ module Errors {
|
|||
>r7arg : <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r7a = [r7arg2, r7arg];
|
||||
>r7a : (((x: { a: string; b: number; }) => number) | (<T>(x: { a: T; b: T; }) => T))[]
|
||||
>[r7arg2, r7arg] : (((x: { a: string; b: number; }) => number) | (<T>(x: { a: T; b: T; }) => T))[]
|
||||
>r7a : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r7arg2, r7arg] : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>r7arg2 : (x: { a: string; b: number; }) => number
|
||||
>r7arg : <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r7b = [r7arg, r7arg2];
|
||||
>r7b : ((<T>(x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[]
|
||||
>[r7arg, r7arg2] : ((<T>(x: { a: T; b: T; }) => T) | ((x: { a: string; b: number; }) => number))[]
|
||||
>r7b : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r7arg, r7arg2] : (<T>(x: { a: T; b: T; }) => T)[]
|
||||
>r7arg : <T>(x: { a: T; b: T; }) => T
|
||||
>r7arg2 : (x: { a: string; b: number; }) => number
|
||||
|
||||
|
@ -547,14 +547,14 @@ module Errors {
|
|||
>r7arg3 : <T extends Base>(x: { a: T; b: T; }) => number
|
||||
|
||||
var r7d = [r7arg2, r7arg3];
|
||||
>r7d : (((x: { a: string; b: number; }) => number) | (<T extends Base>(x: { a: T; b: T; }) => number))[]
|
||||
>[r7arg2, r7arg3] : (((x: { a: string; b: number; }) => number) | (<T extends Base>(x: { a: T; b: T; }) => number))[]
|
||||
>r7d : ((x: { a: string; b: number; }) => number)[]
|
||||
>[r7arg2, r7arg3] : ((x: { a: string; b: number; }) => number)[]
|
||||
>r7arg2 : (x: { a: string; b: number; }) => number
|
||||
>r7arg3 : <T extends Base>(x: { a: T; b: T; }) => number
|
||||
|
||||
var r7e = [r7arg3, r7arg2];
|
||||
>r7e : ((<T extends Base>(x: { a: T; b: T; }) => number) | ((x: { a: string; b: number; }) => number))[]
|
||||
>[r7arg3, r7arg2] : ((<T extends Base>(x: { a: T; b: T; }) => number) | ((x: { a: string; b: number; }) => number))[]
|
||||
>r7e : (<T extends Base>(x: { a: T; b: T; }) => number)[]
|
||||
>[r7arg3, r7arg2] : (<T extends Base>(x: { a: T; b: T; }) => number)[]
|
||||
>r7arg3 : <T extends Base>(x: { a: T; b: T; }) => number
|
||||
>r7arg2 : (x: { a: string; b: number; }) => number
|
||||
|
||||
|
|
|
@ -317,14 +317,14 @@ var r3 = foo3(r3arg);
|
|||
>r3arg : <T>(x: T) => T
|
||||
|
||||
var r3a = [r3arg, r3arg2];
|
||||
>r3a : ((<T>(x: T) => T) | (<T>(x: T) => void))[]
|
||||
>[r3arg, r3arg2] : ((<T>(x: T) => T) | (<T>(x: T) => void))[]
|
||||
>r3a : (<T>(x: T) => T)[]
|
||||
>[r3arg, r3arg2] : (<T>(x: T) => T)[]
|
||||
>r3arg : <T>(x: T) => T
|
||||
>r3arg2 : <T>(x: T) => void
|
||||
|
||||
var r3b = [r3arg2, r3arg];
|
||||
>r3b : ((<T>(x: T) => void) | (<T>(x: T) => T))[]
|
||||
>[r3arg2, r3arg] : ((<T>(x: T) => void) | (<T>(x: T) => T))[]
|
||||
>r3b : (<T>(x: T) => void)[]
|
||||
>[r3arg2, r3arg] : (<T>(x: T) => void)[]
|
||||
>r3arg2 : <T>(x: T) => void
|
||||
>r3arg : <T>(x: T) => T
|
||||
|
||||
|
@ -447,14 +447,14 @@ var r6 = foo6(r6arg);
|
|||
>r6arg : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
|
||||
var r6a = [r6arg, r6arg2];
|
||||
>r6a : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => T) | (<T extends Base>(x: (arg: T) => Derived) => T))[]
|
||||
>[r6arg, r6arg2] : ((<T extends Base, U extends Derived>(x: (arg: T) => U) => T) | (<T extends Base>(x: (arg: T) => Derived) => T))[]
|
||||
>r6a : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>[r6arg, r6arg2] : (<T extends Base, U extends Derived>(x: (arg: T) => U) => T)[]
|
||||
>r6arg : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
>r6arg2 : <T extends Base>(x: (arg: T) => Derived) => T
|
||||
|
||||
var r6b = [r6arg2, r6arg];
|
||||
>r6b : ((<T extends Base>(x: (arg: T) => Derived) => T) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => T))[]
|
||||
>[r6arg2, r6arg] : ((<T extends Base>(x: (arg: T) => Derived) => T) | (<T extends Base, U extends Derived>(x: (arg: T) => U) => T))[]
|
||||
>r6b : (<T extends Base>(x: (arg: T) => Derived) => T)[]
|
||||
>[r6arg2, r6arg] : (<T extends Base>(x: (arg: T) => Derived) => T)[]
|
||||
>r6arg2 : <T extends Base>(x: (arg: T) => Derived) => T
|
||||
>r6arg : <T extends Base, U extends Derived>(x: (arg: T) => U) => T
|
||||
|
||||
|
@ -498,14 +498,14 @@ var r11 = foo11(r11arg);
|
|||
>r11arg : <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
|
||||
var r11a = [r11arg, r11arg2];
|
||||
>r11a : ((<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base) | (<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base))[]
|
||||
>[r11arg, r11arg2] : ((<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base) | (<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base))[]
|
||||
>r11a : (<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base)[]
|
||||
>[r11arg, r11arg2] : (<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base)[]
|
||||
>r11arg : <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
>r11arg2 : <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base
|
||||
|
||||
var r11b = [r11arg2, r11arg];
|
||||
>r11b : ((<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base) | (<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base))[]
|
||||
>[r11arg2, r11arg] : ((<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base) | (<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base))[]
|
||||
>r11b : (<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[]
|
||||
>[r11arg2, r11arg] : (<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[]
|
||||
>r11arg2 : <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base
|
||||
>r11arg : <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
|
||||
|
@ -543,14 +543,14 @@ var r15 = foo15(r15arg);
|
|||
>r15arg : <U, V>(x: { a: U; b: V; }) => U[]
|
||||
|
||||
var r15a = [r15arg, r15arg2];
|
||||
>r15a : ((<U, V>(x: { a: U; b: V; }) => U[]) | (<T>(x: { a: T; b: T; }) => T[]))[]
|
||||
>[r15arg, r15arg2] : ((<U, V>(x: { a: U; b: V; }) => U[]) | (<T>(x: { a: T; b: T; }) => T[]))[]
|
||||
>r15a : (<U, V>(x: { a: U; b: V; }) => U[])[]
|
||||
>[r15arg, r15arg2] : (<U, V>(x: { a: U; b: V; }) => U[])[]
|
||||
>r15arg : <U, V>(x: { a: U; b: V; }) => U[]
|
||||
>r15arg2 : <T>(x: { a: T; b: T; }) => T[]
|
||||
|
||||
var r15b = [r15arg2, r15arg];
|
||||
>r15b : ((<T>(x: { a: T; b: T; }) => T[]) | (<U, V>(x: { a: U; b: V; }) => U[]))[]
|
||||
>[r15arg2, r15arg] : ((<T>(x: { a: T; b: T; }) => T[]) | (<U, V>(x: { a: U; b: V; }) => U[]))[]
|
||||
>r15b : (<T>(x: { a: T; b: T; }) => T[])[]
|
||||
>[r15arg2, r15arg] : (<T>(x: { a: T; b: T; }) => T[])[]
|
||||
>r15arg2 : <T>(x: { a: T; b: T; }) => T[]
|
||||
>r15arg : <U, V>(x: { a: U; b: V; }) => U[]
|
||||
|
||||
|
|
|
@ -326,14 +326,14 @@ var r1 = foo1(r1arg1); // any, return types are not subtype of first overload
|
|||
>r1arg1 : new <T>(x: T) => T[]
|
||||
|
||||
var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions
|
||||
>r1a : ((new (x: number) => number[]) | (new <T>(x: T) => T[]))[]
|
||||
>[r1arg2, r1arg1] : ((new (x: number) => number[]) | (new <T>(x: T) => T[]))[]
|
||||
>r1a : (new <T>(x: T) => T[])[]
|
||||
>[r1arg2, r1arg1] : (new <T>(x: T) => T[])[]
|
||||
>r1arg2 : new (x: number) => number[]
|
||||
>r1arg1 : new <T>(x: T) => T[]
|
||||
|
||||
var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions
|
||||
>r1b : ((new <T>(x: T) => T[]) | (new (x: number) => number[]))[]
|
||||
>[r1arg1, r1arg2] : ((new <T>(x: T) => T[]) | (new (x: number) => number[]))[]
|
||||
>r1b : (new <T>(x: T) => T[])[]
|
||||
>[r1arg1, r1arg2] : (new <T>(x: T) => T[])[]
|
||||
>r1arg1 : new <T>(x: T) => T[]
|
||||
>r1arg2 : new (x: number) => number[]
|
||||
|
||||
|
@ -354,14 +354,14 @@ var r2 = foo2(r2arg1);
|
|||
>r2arg1 : new <T>(x: T) => string[]
|
||||
|
||||
var r2a = [r2arg1, r2arg2];
|
||||
>r2a : ((new <T>(x: T) => string[]) | (new (x: number) => string[]))[]
|
||||
>[r2arg1, r2arg2] : ((new <T>(x: T) => string[]) | (new (x: number) => string[]))[]
|
||||
>r2a : (new <T>(x: T) => string[])[]
|
||||
>[r2arg1, r2arg2] : (new <T>(x: T) => string[])[]
|
||||
>r2arg1 : new <T>(x: T) => string[]
|
||||
>r2arg2 : new (x: number) => string[]
|
||||
|
||||
var r2b = [r2arg2, r2arg1];
|
||||
>r2b : ((new (x: number) => string[]) | (new <T>(x: T) => string[]))[]
|
||||
>[r2arg2, r2arg1] : ((new (x: number) => string[]) | (new <T>(x: T) => string[]))[]
|
||||
>r2b : (new (x: number) => string[])[]
|
||||
>[r2arg2, r2arg1] : (new (x: number) => string[])[]
|
||||
>r2arg2 : new (x: number) => string[]
|
||||
>r2arg1 : new <T>(x: T) => string[]
|
||||
|
||||
|
@ -383,14 +383,14 @@ var r3 = foo3(r3arg1);
|
|||
>r3arg1 : new <T>(x: T) => T
|
||||
|
||||
var r3a = [r3arg1, r3arg2];
|
||||
>r3a : ((new <T>(x: T) => T) | (new (x: number) => void))[]
|
||||
>[r3arg1, r3arg2] : ((new <T>(x: T) => T) | (new (x: number) => void))[]
|
||||
>r3a : (new <T>(x: T) => T)[]
|
||||
>[r3arg1, r3arg2] : (new <T>(x: T) => T)[]
|
||||
>r3arg1 : new <T>(x: T) => T
|
||||
>r3arg2 : new (x: number) => void
|
||||
|
||||
var r3b = [r3arg2, r3arg1];
|
||||
>r3b : ((new (x: number) => void) | (new <T>(x: T) => T))[]
|
||||
>[r3arg2, r3arg1] : ((new (x: number) => void) | (new <T>(x: T) => T))[]
|
||||
>r3b : (new (x: number) => void)[]
|
||||
>[r3arg2, r3arg1] : (new (x: number) => void)[]
|
||||
>r3arg2 : new (x: number) => void
|
||||
>r3arg1 : new <T>(x: T) => T
|
||||
|
||||
|
@ -416,14 +416,14 @@ var r4 = foo4(r4arg1); // any
|
|||
>r4arg1 : new <T, U>(x: T, y: U) => T
|
||||
|
||||
var r4a = [r4arg1, r4arg2];
|
||||
>r4a : ((new <T, U>(x: T, y: U) => T) | (new (x: string, y: number) => string))[]
|
||||
>[r4arg1, r4arg2] : ((new <T, U>(x: T, y: U) => T) | (new (x: string, y: number) => string))[]
|
||||
>r4a : (new <T, U>(x: T, y: U) => T)[]
|
||||
>[r4arg1, r4arg2] : (new <T, U>(x: T, y: U) => T)[]
|
||||
>r4arg1 : new <T, U>(x: T, y: U) => T
|
||||
>r4arg2 : new (x: string, y: number) => string
|
||||
|
||||
var r4b = [r4arg2, r4arg1];
|
||||
>r4b : ((new (x: string, y: number) => string) | (new <T, U>(x: T, y: U) => T))[]
|
||||
>[r4arg2, r4arg1] : ((new (x: string, y: number) => string) | (new <T, U>(x: T, y: U) => T))[]
|
||||
>r4b : (new <T, U>(x: T, y: U) => T)[]
|
||||
>[r4arg2, r4arg1] : (new <T, U>(x: T, y: U) => T)[]
|
||||
>r4arg2 : new (x: string, y: number) => string
|
||||
>r4arg1 : new <T, U>(x: T, y: U) => T
|
||||
|
||||
|
@ -449,14 +449,14 @@ var r5 = foo5(r5arg1); // any
|
|||
>r5arg1 : new <T, U>(x: new (arg: T) => U) => T
|
||||
|
||||
var r5a = [r5arg1, r5arg2];
|
||||
>r5a : ((new <T, U>(x: new (arg: T) => U) => T) | (new (x: new (arg: string) => number) => string))[]
|
||||
>[r5arg1, r5arg2] : ((new <T, U>(x: new (arg: T) => U) => T) | (new (x: new (arg: string) => number) => string))[]
|
||||
>r5a : (new <T, U>(x: new (arg: T) => U) => T)[]
|
||||
>[r5arg1, r5arg2] : (new <T, U>(x: new (arg: T) => U) => T)[]
|
||||
>r5arg1 : new <T, U>(x: new (arg: T) => U) => T
|
||||
>r5arg2 : new (x: new (arg: string) => number) => string
|
||||
|
||||
var r5b = [r5arg2, r5arg1];
|
||||
>r5b : ((new (x: new (arg: string) => number) => string) | (new <T, U>(x: new (arg: T) => U) => T))[]
|
||||
>[r5arg2, r5arg1] : ((new (x: new (arg: string) => number) => string) | (new <T, U>(x: new (arg: T) => U) => T))[]
|
||||
>r5b : (new <T, U>(x: new (arg: T) => U) => T)[]
|
||||
>[r5arg2, r5arg1] : (new <T, U>(x: new (arg: T) => U) => T)[]
|
||||
>r5arg2 : new (x: new (arg: string) => number) => string
|
||||
>r5arg1 : new <T, U>(x: new (arg: T) => U) => T
|
||||
|
||||
|
@ -487,14 +487,14 @@ var r6 = foo6(r6arg1); // any
|
|||
>r6arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
|
||||
var r6a = [r6arg1, r6arg2];
|
||||
>r6a : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T) | (new (x: new (arg: Base) => Derived) => Base))[]
|
||||
>[r6arg1, r6arg2] : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T) | (new (x: new (arg: Base) => Derived) => Base))[]
|
||||
>r6a : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>[r6arg1, r6arg2] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>r6arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
>r6arg2 : new (x: new (arg: Base) => Derived) => Base
|
||||
|
||||
var r6b = [r6arg2, r6arg1];
|
||||
>r6b : ((new (x: new (arg: Base) => Derived) => Base) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T))[]
|
||||
>[r6arg2, r6arg1] : ((new (x: new (arg: Base) => Derived) => Base) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T))[]
|
||||
>r6b : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>[r6arg2, r6arg1] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>r6arg2 : new (x: new (arg: Base) => Derived) => Base
|
||||
>r6arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
|
||||
|
@ -529,14 +529,14 @@ var r7 = foo7(r7arg1); // any
|
|||
>r7arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U
|
||||
|
||||
var r7a = [r7arg1, r7arg2];
|
||||
>r7a : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U) | (new (x: new (arg: Base) => Derived) => new (r: Base) => Derived))[]
|
||||
>[r7arg1, r7arg2] : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U) | (new (x: new (arg: Base) => Derived) => new (r: Base) => Derived))[]
|
||||
>r7a : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U)[]
|
||||
>[r7arg1, r7arg2] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U)[]
|
||||
>r7arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U
|
||||
>r7arg2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived
|
||||
|
||||
var r7b = [r7arg2, r7arg1];
|
||||
>r7b : ((new (x: new (arg: Base) => Derived) => new (r: Base) => Derived) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U))[]
|
||||
>[r7arg2, r7arg1] : ((new (x: new (arg: Base) => Derived) => new (r: Base) => Derived) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U))[]
|
||||
>r7b : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U)[]
|
||||
>[r7arg2, r7arg1] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U)[]
|
||||
>r7arg2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived
|
||||
>r7arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => new (r: T) => U
|
||||
|
||||
|
@ -579,14 +579,14 @@ var r8 = foo8(r8arg1); // any
|
|||
>r8arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U
|
||||
|
||||
var r8a = [r8arg1, r8arg2];
|
||||
>r8a : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U) | (new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived))[]
|
||||
>[r8arg1, r8arg2] : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U) | (new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived))[]
|
||||
>r8a : (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U)[]
|
||||
>[r8arg1, r8arg2] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U)[]
|
||||
>r8arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U
|
||||
>r8arg2 : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived
|
||||
|
||||
var r8b = [r8arg2, r8arg1];
|
||||
>r8b : ((new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U))[]
|
||||
>[r8arg2, r8arg1] : ((new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U))[]
|
||||
>r8b : (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U)[]
|
||||
>[r8arg2, r8arg1] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U)[]
|
||||
>r8arg2 : new (x: new (arg: Base) => Derived, y: new (arg2: Base) => Derived) => new (r: Base) => Derived
|
||||
>r8arg1 : new <T extends Base, U extends Derived>(x: new (arg: T) => U, y: new (arg2: T) => U) => new (r: T) => U
|
||||
|
||||
|
@ -662,14 +662,14 @@ var r10 = foo10(r10arg1); // any
|
|||
>r10arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r10a = [r10arg1, r10arg2];
|
||||
>r10a : ((new <T extends Derived>(...x: T[]) => T) | (new (...x: Derived[]) => Derived))[]
|
||||
>[r10arg1, r10arg2] : ((new <T extends Derived>(...x: T[]) => T) | (new (...x: Derived[]) => Derived))[]
|
||||
>r10a : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>[r10arg1, r10arg2] : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>r10arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
>r10arg2 : new (...x: Derived[]) => Derived
|
||||
|
||||
var r10b = [r10arg2, r10arg1];
|
||||
>r10b : ((new (...x: Derived[]) => Derived) | (new <T extends Derived>(...x: T[]) => T))[]
|
||||
>[r10arg2, r10arg1] : ((new (...x: Derived[]) => Derived) | (new <T extends Derived>(...x: T[]) => T))[]
|
||||
>r10b : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>[r10arg2, r10arg1] : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>r10arg2 : new (...x: Derived[]) => Derived
|
||||
>r10arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
|
||||
|
@ -699,14 +699,14 @@ var r11 = foo11(r11arg1); // any
|
|||
>r11arg1 : new <T extends Base>(x: T, y: T) => T
|
||||
|
||||
var r11a = [r11arg1, r11arg2];
|
||||
>r11a : ((new <T extends Base>(x: T, y: T) => T) | (new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>[r11arg1, r11arg2] : ((new <T extends Base>(x: T, y: T) => T) | (new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>r11a : (new <T extends Base>(x: T, y: T) => T)[]
|
||||
>[r11arg1, r11arg2] : (new <T extends Base>(x: T, y: T) => T)[]
|
||||
>r11arg1 : new <T extends Base>(x: T, y: T) => T
|
||||
>r11arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
|
||||
var r11b = [r11arg2, r11arg1];
|
||||
>r11b : ((new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (new <T extends Base>(x: T, y: T) => T))[]
|
||||
>[r11arg2, r11arg1] : ((new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (new <T extends Base>(x: T, y: T) => T))[]
|
||||
>r11b : (new <T extends Base>(x: T, y: T) => T)[]
|
||||
>[r11arg2, r11arg1] : (new <T extends Base>(x: T, y: T) => T)[]
|
||||
>r11arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
>r11arg1 : new <T extends Base>(x: T, y: T) => T
|
||||
|
||||
|
@ -741,14 +741,14 @@ var r12 = foo12(r12arg1); // any
|
|||
>r12arg1 : new <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
|
||||
var r12a = [r12arg1, r12arg2];
|
||||
>r12a : ((new <T extends Base[]>(x: Base[], y: T) => Derived[]) | (new (x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>[r12arg1, r12arg2] : ((new <T extends Base[]>(x: Base[], y: T) => Derived[]) | (new (x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>r12a : (new <T extends Base[]>(x: Base[], y: T) => Derived[])[]
|
||||
>[r12arg1, r12arg2] : (new <T extends Base[]>(x: Base[], y: T) => Derived[])[]
|
||||
>r12arg1 : new <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>r12arg2 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r12b = [r12arg2, r12arg1];
|
||||
>r12b : ((new (x: Base[], y: Derived2[]) => Derived[]) | (new <T extends Base[]>(x: Base[], y: T) => Derived[]))[]
|
||||
>[r12arg2, r12arg1] : ((new (x: Base[], y: Derived2[]) => Derived[]) | (new <T extends Base[]>(x: Base[], y: T) => Derived[]))[]
|
||||
>r12b : (new (x: Base[], y: Derived2[]) => Derived[])[]
|
||||
>[r12arg2, r12arg1] : (new (x: Base[], y: Derived2[]) => Derived[])[]
|
||||
>r12arg2 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
>r12arg1 : new <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
|
||||
|
@ -782,14 +782,14 @@ var r13 = foo13(r13arg1); // any
|
|||
>r13arg1 : new <T extends Derived[]>(x: Base[], y: T) => T
|
||||
|
||||
var r13a = [r13arg1, r13arg2];
|
||||
>r13a : ((new <T extends Derived[]>(x: Base[], y: T) => T) | (new (x: Base[], y: Derived[]) => Derived[]))[]
|
||||
>[r13arg1, r13arg2] : ((new <T extends Derived[]>(x: Base[], y: T) => T) | (new (x: Base[], y: Derived[]) => Derived[]))[]
|
||||
>r13a : (new <T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>[r13arg1, r13arg2] : (new <T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>r13arg1 : new <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>r13arg2 : new (x: Base[], y: Derived[]) => Derived[]
|
||||
|
||||
var r13b = [r13arg2, r13arg1];
|
||||
>r13b : ((new (x: Base[], y: Derived[]) => Derived[]) | (new <T extends Derived[]>(x: Base[], y: T) => T))[]
|
||||
>[r13arg2, r13arg1] : ((new (x: Base[], y: Derived[]) => Derived[]) | (new <T extends Derived[]>(x: Base[], y: T) => T))[]
|
||||
>r13b : (new <T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>[r13arg2, r13arg1] : (new <T extends Derived[]>(x: Base[], y: T) => T)[]
|
||||
>r13arg2 : new (x: Base[], y: Derived[]) => Derived[]
|
||||
>r13arg1 : new <T extends Derived[]>(x: Base[], y: T) => T
|
||||
|
||||
|
@ -817,14 +817,14 @@ var r14 = foo14(r14arg1); // any
|
|||
>r14arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r14a = [r14arg1, r14arg2];
|
||||
>r14a : ((new <T>(x: { a: T; b: T; }) => T) | (new (x: { a: string; b: number; }) => Object))[]
|
||||
>[r14arg1, r14arg2] : ((new <T>(x: { a: T; b: T; }) => T) | (new (x: { a: string; b: number; }) => Object))[]
|
||||
>r14a : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r14arg1, r14arg2] : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>r14arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
>r14arg2 : new (x: { a: string; b: number; }) => Object
|
||||
|
||||
var r14b = [r14arg2, r14arg1];
|
||||
>r14b : ((new (x: { a: string; b: number; }) => Object) | (new <T>(x: { a: T; b: T; }) => T))[]
|
||||
>[r14arg2, r14arg1] : ((new (x: { a: string; b: number; }) => Object) | (new <T>(x: { a: T; b: T; }) => T))[]
|
||||
>r14b : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r14arg2, r14arg1] : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>r14arg2 : new (x: { a: string; b: number; }) => Object
|
||||
>r14arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
|
|
|
@ -224,14 +224,14 @@ module Errors {
|
|||
>r1arg1 : new <T, U>(x: T) => U[]
|
||||
|
||||
var r1a = [r1arg2, r1arg1];
|
||||
>r1a : ((new (x: number) => string[]) | (new <T, U>(x: T) => U[]))[]
|
||||
>[r1arg2, r1arg1] : ((new (x: number) => string[]) | (new <T, U>(x: T) => U[]))[]
|
||||
>r1a : (new <T, U>(x: T) => U[])[]
|
||||
>[r1arg2, r1arg1] : (new <T, U>(x: T) => U[])[]
|
||||
>r1arg2 : new (x: number) => string[]
|
||||
>r1arg1 : new <T, U>(x: T) => U[]
|
||||
|
||||
var r1b = [r1arg1, r1arg2];
|
||||
>r1b : ((new <T, U>(x: T) => U[]) | (new (x: number) => string[]))[]
|
||||
>[r1arg1, r1arg2] : ((new <T, U>(x: T) => U[]) | (new (x: number) => string[]))[]
|
||||
>r1b : (new <T, U>(x: T) => U[])[]
|
||||
>[r1arg1, r1arg2] : (new <T, U>(x: T) => U[])[]
|
||||
>r1arg1 : new <T, U>(x: T) => U[]
|
||||
>r1arg2 : new (x: number) => string[]
|
||||
|
||||
|
@ -268,14 +268,14 @@ module Errors {
|
|||
>r2arg1 : new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V
|
||||
|
||||
var r2a = [r2arg2, r2arg1];
|
||||
>r2a : ((new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2) | (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V))[]
|
||||
>[r2arg2, r2arg1] : ((new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2) | (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V))[]
|
||||
>r2a : (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V)[]
|
||||
>[r2arg2, r2arg1] : (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V)[]
|
||||
>r2arg2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2
|
||||
>r2arg1 : new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V
|
||||
|
||||
var r2b = [r2arg1, r2arg2];
|
||||
>r2b : ((new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V) | (new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2))[]
|
||||
>[r2arg1, r2arg2] : ((new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V) | (new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2))[]
|
||||
>r2b : (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V)[]
|
||||
>[r2arg1, r2arg2] : (new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V)[]
|
||||
>r2arg1 : new <T extends Base, U extends Derived, V extends Derived2>(x: new (arg: T) => U) => new (r: T) => V
|
||||
>r2arg2 : new (x: new (arg: Base) => Derived) => new (r: Base) => Derived2
|
||||
|
||||
|
@ -350,14 +350,14 @@ module Errors {
|
|||
>r4arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r4a = [r4arg2, r4arg1];
|
||||
>r4a : ((new (...x: Base[]) => Base) | (new <T extends Derived>(...x: T[]) => T))[]
|
||||
>[r4arg2, r4arg1] : ((new (...x: Base[]) => Base) | (new <T extends Derived>(...x: T[]) => T))[]
|
||||
>r4a : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>[r4arg2, r4arg1] : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>r4arg2 : new (...x: Base[]) => Base
|
||||
>r4arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
|
||||
var r4b = [r4arg1, r4arg2];
|
||||
>r4b : ((new <T extends Derived>(...x: T[]) => T) | (new (...x: Base[]) => Base))[]
|
||||
>[r4arg1, r4arg2] : ((new <T extends Derived>(...x: T[]) => T) | (new (...x: Base[]) => Base))[]
|
||||
>r4b : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>[r4arg1, r4arg2] : (new <T extends Derived>(...x: T[]) => T)[]
|
||||
>r4arg1 : new <T extends Derived>(...x: T[]) => T
|
||||
>r4arg2 : new (...x: Base[]) => Base
|
||||
|
||||
|
@ -387,14 +387,14 @@ module Errors {
|
|||
>r5arg1 : new <T extends Derived>(x: T, y: T) => T
|
||||
|
||||
var r5a = [r5arg2, r5arg1];
|
||||
>r5a : ((new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (new <T extends Derived>(x: T, y: T) => T))[]
|
||||
>[r5arg2, r5arg1] : ((new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base) | (new <T extends Derived>(x: T, y: T) => T))[]
|
||||
>r5a : (new <T extends Derived>(x: T, y: T) => T)[]
|
||||
>[r5arg2, r5arg1] : (new <T extends Derived>(x: T, y: T) => T)[]
|
||||
>r5arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
>r5arg1 : new <T extends Derived>(x: T, y: T) => T
|
||||
|
||||
var r5b = [r5arg1, r5arg2];
|
||||
>r5b : ((new <T extends Derived>(x: T, y: T) => T) | (new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>[r5arg1, r5arg2] : ((new <T extends Derived>(x: T, y: T) => T) | (new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base))[]
|
||||
>r5b : (new <T extends Derived>(x: T, y: T) => T)[]
|
||||
>[r5arg1, r5arg2] : (new <T extends Derived>(x: T, y: T) => T)[]
|
||||
>r5arg1 : new <T extends Derived>(x: T, y: T) => T
|
||||
>r5arg2 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
|
||||
|
||||
|
@ -429,14 +429,14 @@ module Errors {
|
|||
>r6arg1 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r6a = [r6arg2, r6arg1];
|
||||
>r6a : ((new <T extends Derived2[]>(x: Base[], y: Base[]) => T) | (new (x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>[r6arg2, r6arg1] : ((new <T extends Derived2[]>(x: Base[], y: Base[]) => T) | (new (x: Base[], y: Derived2[]) => Derived[]))[]
|
||||
>r6a : (new <T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>[r6arg2, r6arg1] : (new <T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>r6arg2 : new <T extends Derived2[]>(x: Base[], y: Base[]) => T
|
||||
>r6arg1 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
|
||||
var r6b = [r6arg1, r6arg2];
|
||||
>r6b : ((new (x: Base[], y: Derived2[]) => Derived[]) | (new <T extends Derived2[]>(x: Base[], y: Base[]) => T))[]
|
||||
>[r6arg1, r6arg2] : ((new (x: Base[], y: Derived2[]) => Derived[]) | (new <T extends Derived2[]>(x: Base[], y: Base[]) => T))[]
|
||||
>r6b : (new <T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>[r6arg1, r6arg2] : (new <T extends Derived2[]>(x: Base[], y: Base[]) => T)[]
|
||||
>r6arg1 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
>r6arg2 : new <T extends Derived2[]>(x: Base[], y: Base[]) => T
|
||||
|
||||
|
@ -463,14 +463,14 @@ module Errors {
|
|||
>r7arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r7a = [r7arg2, r7arg1];
|
||||
>r7a : ((new (x: { a: string; b: number; }) => number) | (new <T>(x: { a: T; b: T; }) => T))[]
|
||||
>[r7arg2, r7arg1] : ((new (x: { a: string; b: number; }) => number) | (new <T>(x: { a: T; b: T; }) => T))[]
|
||||
>r7a : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r7arg2, r7arg1] : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>r7arg2 : new (x: { a: string; b: number; }) => number
|
||||
>r7arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
|
||||
var r7b = [r7arg1, r7arg2];
|
||||
>r7b : ((new <T>(x: { a: T; b: T; }) => T) | (new (x: { a: string; b: number; }) => number))[]
|
||||
>[r7arg1, r7arg2] : ((new <T>(x: { a: T; b: T; }) => T) | (new (x: { a: string; b: number; }) => number))[]
|
||||
>r7b : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>[r7arg1, r7arg2] : (new <T>(x: { a: T; b: T; }) => T)[]
|
||||
>r7arg1 : new <T>(x: { a: T; b: T; }) => T
|
||||
>r7arg2 : new (x: { a: string; b: number; }) => number
|
||||
|
||||
|
@ -491,14 +491,14 @@ module Errors {
|
|||
>r7arg3 : new <T extends Base>(x: { a: T; b: T; }) => number
|
||||
|
||||
var r7d = [r7arg2, r7arg3];
|
||||
>r7d : ((new (x: { a: string; b: number; }) => number) | (new <T extends Base>(x: { a: T; b: T; }) => number))[]
|
||||
>[r7arg2, r7arg3] : ((new (x: { a: string; b: number; }) => number) | (new <T extends Base>(x: { a: T; b: T; }) => number))[]
|
||||
>r7d : (new (x: { a: string; b: number; }) => number)[]
|
||||
>[r7arg2, r7arg3] : (new (x: { a: string; b: number; }) => number)[]
|
||||
>r7arg2 : new (x: { a: string; b: number; }) => number
|
||||
>r7arg3 : new <T extends Base>(x: { a: T; b: T; }) => number
|
||||
|
||||
var r7e = [r7arg3, r7arg2];
|
||||
>r7e : ((new <T extends Base>(x: { a: T; b: T; }) => number) | (new (x: { a: string; b: number; }) => number))[]
|
||||
>[r7arg3, r7arg2] : ((new <T extends Base>(x: { a: T; b: T; }) => number) | (new (x: { a: string; b: number; }) => number))[]
|
||||
>r7e : (new <T extends Base>(x: { a: T; b: T; }) => number)[]
|
||||
>[r7arg3, r7arg2] : (new <T extends Base>(x: { a: T; b: T; }) => number)[]
|
||||
>r7arg3 : new <T extends Base>(x: { a: T; b: T; }) => number
|
||||
>r7arg2 : new (x: { a: string; b: number; }) => number
|
||||
|
||||
|
|
|
@ -301,14 +301,14 @@ var r3 = foo3(r3arg);
|
|||
>r3arg : new <T>(x: T) => T
|
||||
|
||||
var r3a = [r3arg, r3arg2];
|
||||
>r3a : ((new <T>(x: T) => T) | (new <T>(x: T) => void))[]
|
||||
>[r3arg, r3arg2] : ((new <T>(x: T) => T) | (new <T>(x: T) => void))[]
|
||||
>r3a : (new <T>(x: T) => T)[]
|
||||
>[r3arg, r3arg2] : (new <T>(x: T) => T)[]
|
||||
>r3arg : new <T>(x: T) => T
|
||||
>r3arg2 : new <T>(x: T) => void
|
||||
|
||||
var r3b = [r3arg2, r3arg];
|
||||
>r3b : ((new <T>(x: T) => void) | (new <T>(x: T) => T))[]
|
||||
>[r3arg2, r3arg] : ((new <T>(x: T) => void) | (new <T>(x: T) => T))[]
|
||||
>r3b : (new <T>(x: T) => void)[]
|
||||
>[r3arg2, r3arg] : (new <T>(x: T) => void)[]
|
||||
>r3arg2 : new <T>(x: T) => void
|
||||
>r3arg : new <T>(x: T) => T
|
||||
|
||||
|
@ -415,14 +415,14 @@ var r6 = foo6(r6arg);
|
|||
>r6arg : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
|
||||
var r6a = [r6arg, r6arg2];
|
||||
>r6a : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T) | (new <T extends Base>(x: new (arg: T) => Derived) => T))[]
|
||||
>[r6arg, r6arg2] : ((new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T) | (new <T extends Base>(x: new (arg: T) => Derived) => T))[]
|
||||
>r6a : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>[r6arg, r6arg2] : (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T)[]
|
||||
>r6arg : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
>r6arg2 : new <T extends Base>(x: new (arg: T) => Derived) => T
|
||||
|
||||
var r6b = [r6arg2, r6arg];
|
||||
>r6b : ((new <T extends Base>(x: new (arg: T) => Derived) => T) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T))[]
|
||||
>[r6arg2, r6arg] : ((new <T extends Base>(x: new (arg: T) => Derived) => T) | (new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T))[]
|
||||
>r6b : (new <T extends Base>(x: new (arg: T) => Derived) => T)[]
|
||||
>[r6arg2, r6arg] : (new <T extends Base>(x: new (arg: T) => Derived) => T)[]
|
||||
>r6arg2 : new <T extends Base>(x: new (arg: T) => Derived) => T
|
||||
>r6arg : new <T extends Base, U extends Derived>(x: new (arg: T) => U) => T
|
||||
|
||||
|
@ -460,14 +460,14 @@ var r11 = foo11(r11arg);
|
|||
>r11arg : new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
|
||||
var r11a = [r11arg, r11arg2];
|
||||
>r11a : ((new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base) | (new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base))[]
|
||||
>[r11arg, r11arg2] : ((new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base) | (new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base))[]
|
||||
>r11a : (new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base)[]
|
||||
>[r11arg, r11arg2] : (new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base)[]
|
||||
>r11arg : new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
>r11arg2 : new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base
|
||||
|
||||
var r11b = [r11arg2, r11arg];
|
||||
>r11b : ((new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base) | (new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base))[]
|
||||
>[r11arg2, r11arg] : ((new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base) | (new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base))[]
|
||||
>r11b : (new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[]
|
||||
>[r11arg2, r11arg] : (new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base)[]
|
||||
>r11arg2 : new <T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base
|
||||
>r11arg : new <T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base
|
||||
|
||||
|
@ -499,14 +499,14 @@ var r15 = foo15(r15arg);
|
|||
>r15arg : new <U, V>(x: { a: U; b: V; }) => U[]
|
||||
|
||||
var r15a = [r15arg, r15arg2];
|
||||
>r15a : ((new <U, V>(x: { a: U; b: V; }) => U[]) | (new <T>(x: { a: T; b: T; }) => T[]))[]
|
||||
>[r15arg, r15arg2] : ((new <U, V>(x: { a: U; b: V; }) => U[]) | (new <T>(x: { a: T; b: T; }) => T[]))[]
|
||||
>r15a : (new <U, V>(x: { a: U; b: V; }) => U[])[]
|
||||
>[r15arg, r15arg2] : (new <U, V>(x: { a: U; b: V; }) => U[])[]
|
||||
>r15arg : new <U, V>(x: { a: U; b: V; }) => U[]
|
||||
>r15arg2 : new <T>(x: { a: T; b: T; }) => T[]
|
||||
|
||||
var r15b = [r15arg2, r15arg];
|
||||
>r15b : ((new <T>(x: { a: T; b: T; }) => T[]) | (new <U, V>(x: { a: U; b: V; }) => U[]))[]
|
||||
>[r15arg2, r15arg] : ((new <T>(x: { a: T; b: T; }) => T[]) | (new <U, V>(x: { a: U; b: V; }) => U[]))[]
|
||||
>r15b : (new <T>(x: { a: T; b: T; }) => T[])[]
|
||||
>[r15arg2, r15arg] : (new <T>(x: { a: T; b: T; }) => T[])[]
|
||||
>r15arg2 : new <T>(x: { a: T; b: T; }) => T[]
|
||||
>r15arg : new <U, V>(x: { a: U; b: V; }) => U[]
|
||||
|
||||
|
|
|
@ -85,8 +85,8 @@ var b = { Foo: <Derived>null };
|
|||
>null : null
|
||||
|
||||
var r = true ? a : b;
|
||||
>r : { Foo?: Base; } | { Foo: Derived; }
|
||||
>true ? a : b : { Foo?: Base; } | { Foo: Derived; }
|
||||
>r : { Foo?: Base; }
|
||||
>true ? a : b : { Foo?: Base; }
|
||||
>true : boolean
|
||||
>a : { Foo?: Base; }
|
||||
>b : { Foo: Derived; }
|
||||
|
@ -156,8 +156,8 @@ module TwoLevels {
|
|||
>null : null
|
||||
|
||||
var r = true ? a : b;
|
||||
>r : { Foo?: Base; } | { Foo: Derived2; }
|
||||
>true ? a : b : { Foo?: Base; } | { Foo: Derived2; }
|
||||
>r : { Foo?: Base; }
|
||||
>true ? a : b : { Foo?: Base; }
|
||||
>true : boolean
|
||||
>a : { Foo?: Base; }
|
||||
>b : { Foo: Derived2; }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,10): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'.
|
||||
tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,20): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'.
|
||||
Object literal may only specify known properties, and 'name' does not exist in type 'C'.
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,10):
|
|||
switch (new C()) {
|
||||
case new D():
|
||||
case { id: 12, name: '' }:
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type 'C'.
|
||||
case new C():
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/es6/Symbols/symbolProperty21.ts(8,5): error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I<boolean, string>'.
|
||||
tests/cases/conformance/es6/Symbols/symbolProperty21.ts(10,5): error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I<boolean, string>'.
|
||||
Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I<boolean, string>'.
|
||||
|
||||
|
||||
|
@ -11,14 +11,10 @@ tests/cases/conformance/es6/Symbols/symbolProperty21.ts(8,5): error TS2345: Argu
|
|||
declare function foo<T, U>(p: I<T, U>): { t: T; u: U };
|
||||
|
||||
foo({
|
||||
~
|
||||
[Symbol.isConcatSpreadable]: "",
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[Symbol.toPrimitive]: 0,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[Symbol.unscopables]: true
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
});
|
||||
~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I<boolean, string>'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I<boolean, string>'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I<boolean, string>'.
|
||||
[Symbol.unscopables]: true
|
||||
});
|
|
@ -33,7 +33,7 @@ s || 1;
|
|||
>1 : number
|
||||
|
||||
({}) || s;
|
||||
>({}) || s : {} | symbol
|
||||
>({}) || s : {}
|
||||
>({}) : {}
|
||||
>{} : {}
|
||||
>s : symbol
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(64,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(77,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(77,79): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
|
||||
|
@ -86,7 +86,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
|
|||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(63,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,79): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
|
||||
|
@ -85,7 +85,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference
|
|||
}
|
||||
|
||||
var a9e = someGenerics9 `${ undefined }${ { x: 6, z: new Date() } }${ { x: 6, y: '' } }`;
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/compiler/typeArgInference2.ts(12,52): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'.
|
||||
Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'.
|
||||
|
||||
|
@ -16,7 +16,7 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argumen
|
|||
var z4 = foo({ name: "abc" }); // { name: string }
|
||||
var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number }
|
||||
var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error
|
||||
~~~
|
||||
~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'.
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,69): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
|
||||
|
@ -93,13 +93,13 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66
|
|||
z?: Date;
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'.
|
||||
var a9e: {};
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: new Date() }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
var a9f: A92;
|
||||
|
|
|
@ -12,12 +12,12 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
|||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,69): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,74): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
|
||||
|
@ -163,17 +163,17 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct
|
|||
!!! error TS2304: Cannot find name 'Window'.
|
||||
}
|
||||
var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
var a9e: {};
|
||||
var a9f = new someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
var a9f: A92;
|
||||
|
|
|
@ -17,12 +17,12 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
|||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,65): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,62): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,70): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
|
||||
|
||||
|
@ -145,17 +145,17 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst
|
|||
!!! error TS2304: Cannot find name 'Window'.
|
||||
}
|
||||
var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~~~~~~~~
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
var a9e: {};
|
||||
var a9f = someGenerics9<A92>(undefined, { x: 6, z: window }, { x: 6, y: '' });
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~
|
||||
!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'.
|
||||
var a9f: A92;
|
||||
|
|
|
@ -363,9 +363,9 @@ function foo12(x: number | string | boolean) {
|
|||
>10 : number
|
||||
>x.toString().length : number
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
>length : number
|
||||
|
||||
: ((b = x) // x is number | boolean | string - changed in true branch
|
||||
|
|
|
@ -333,9 +333,9 @@ function foo11(x: number | string | boolean) {
|
|||
>10 && x.toString() : string
|
||||
>10 : number
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
|
||||
)
|
||||
: (
|
||||
|
@ -348,9 +348,9 @@ function foo11(x: number | string | boolean) {
|
|||
>x && x.toString() : string
|
||||
>x : number | string | boolean
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
|
||||
);
|
||||
}
|
||||
|
@ -369,9 +369,9 @@ function foo12(x: number | string | boolean) {
|
|||
|
||||
return x.toString(); // string | number | boolean - x changed in else branch
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
}
|
||||
else {
|
||||
x = 10;
|
||||
|
|
|
@ -180,9 +180,9 @@ function foo7(x: number | string | boolean) {
|
|||
>10 && x.toString() : string
|
||||
>10 : number
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
|
||||
// do not change value
|
||||
: (y = x && x.toString()))); // number | boolean | string
|
||||
|
@ -192,9 +192,9 @@ function foo7(x: number | string | boolean) {
|
|||
>x && x.toString() : string
|
||||
>x : number | string | boolean
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
}
|
||||
function foo8(x: number | string) {
|
||||
>foo8 : (x: number | string) => number
|
||||
|
|
|
@ -180,9 +180,9 @@ function foo7(x: number | string | boolean) {
|
|||
>10 && x.toString() : string
|
||||
>10 : number
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
|
||||
// do not change value
|
||||
: (y = x && x.toString()))); // number | boolean | string
|
||||
|
@ -192,9 +192,9 @@ function foo7(x: number | string | boolean) {
|
|||
>x && x.toString() : string
|
||||
>x : number | string | boolean
|
||||
>x.toString() : string
|
||||
>x.toString : ((radix?: number) => string) | (() => string)
|
||||
>x.toString : (radix?: number) => string
|
||||
>x : number | string | boolean
|
||||
>toString : ((radix?: number) => string) | (() => string)
|
||||
>toString : (radix?: number) => string
|
||||
}
|
||||
function foo8(x: number | string) {
|
||||
>foo8 : (x: number | string) => boolean | number
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'.
|
||||
tests/cases/compiler/typeInfer1.ts(12,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'.
|
||||
Object literal may only specify known properties, and 'Moo' does not exist in type 'ITextWriter2'.
|
||||
|
||||
|
||||
|
@ -14,8 +14,8 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => strin
|
|||
}
|
||||
|
||||
var yyyyyyyy: ITextWriter2 = {
|
||||
~~~~~~~~
|
||||
Moo: function() { return "cow"; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'Moo' does not exist in type 'ITextWriter2'.
|
||||
Moo: function() { return "cow"; }
|
||||
}
|
|
@ -2,9 +2,9 @@ tests/cases/compiler/typeMatch2.ts(3,2): error TS2322: Type '{}' is not assignab
|
|||
Property 'x' is missing in type '{}'.
|
||||
tests/cases/compiler/typeMatch2.ts(4,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Property 'y' is missing in type '{ x: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(5,2): error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(5,20): error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(6,5): error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(6,17): error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'.
|
||||
Type 'Animal' is not assignable to type 'Giraffe'.
|
||||
|
@ -13,7 +13,7 @@ tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2:
|
|||
Types of property 'f2' are incompatible.
|
||||
Type 'Animal[]' is not assignable to type 'Giraffe[]'.
|
||||
Type 'Animal' is not assignable to type 'Giraffe'.
|
||||
tests/cases/compiler/typeMatch2.ts(34,5): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(34,26): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Property 'y' is missing in type '{ x: number; }'.
|
||||
|
@ -31,11 +31,11 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is
|
|||
!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
!!! error TS2322: Property 'y' is missing in type '{ x: number; }'.
|
||||
a = { x: 1, y: 2, z: 3 };
|
||||
~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
a = { x: 1, z: 3 }; // error
|
||||
~
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is
|
|||
a = { x: 1, y: undefined };
|
||||
a = { x: 1, y: _any };
|
||||
a = { x: 1, y: _any, z:1 };
|
||||
~
|
||||
~~~
|
||||
!!! error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
a = { x: 1 }; // error
|
||||
|
|
|
@ -547,7 +547,7 @@ _.flatten([1, [2], [3, [[4]]]]);
|
|||
>_.flatten : { <T>(list: T[][]): T[]; <T>(array: any[], shallow?: boolean): T[]; }
|
||||
>_ : Underscore.Static
|
||||
>flatten : { <T>(list: T[][]): T[]; <T>(array: any[], shallow?: boolean): T[]; }
|
||||
>[1, [2], [3, [[4]]]] : (number | number[] | (number | number[][])[])[]
|
||||
>[1, [2], [3, [[4]]]] : (number | (number | number[][])[])[]
|
||||
>1 : number
|
||||
>[2] : number[]
|
||||
>2 : number
|
||||
|
@ -562,7 +562,7 @@ _.flatten([1, [2], [3, [[4]]]], true);
|
|||
>_.flatten : { <T>(list: T[][]): T[]; <T>(array: any[], shallow?: boolean): T[]; }
|
||||
>_ : Underscore.Static
|
||||
>flatten : { <T>(list: T[][]): T[]; <T>(array: any[], shallow?: boolean): T[]; }
|
||||
>[1, [2], [3, [[4]]]] : (number | number[] | (number | number[][])[])[]
|
||||
>[1, [2], [3, [[4]]]] : (number | (number | number[][])[])[]
|
||||
>1 : number
|
||||
>[2] : number[]
|
||||
>2 : number
|
||||
|
|
|
@ -83,15 +83,15 @@ var arr6 = [c, d]; // (C | D)[]
|
|||
>d : D
|
||||
|
||||
var arr7 = [c, d, e]; // (C | D)[]
|
||||
>arr7 : (C | D | E)[]
|
||||
>[c, d, e] : (C | D | E)[]
|
||||
>arr7 : (C | D)[]
|
||||
>[c, d, e] : (C | D)[]
|
||||
>c : C
|
||||
>d : D
|
||||
>e : E
|
||||
|
||||
var arr8 = [c, e]; // C[]
|
||||
>arr8 : (C | E)[]
|
||||
>[c, e] : (C | E)[]
|
||||
>arr8 : C[]
|
||||
>[c, e] : C[]
|
||||
>c : C
|
||||
>e : E
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ var e1: I2 | I3;
|
|||
>I3 : I3
|
||||
|
||||
var e2 = i2 || i3; // Type of e2 immediately reduced to I3
|
||||
>e2 : I2 | I3
|
||||
>i2 || i3 : I2 | I3
|
||||
>e2 : I3
|
||||
>i2 || i3 : I3
|
||||
>i2 : I2
|
||||
>i3 : I3
|
||||
|
||||
|
@ -38,5 +38,5 @@ var r1 = e1(); // Type of e1 reduced to I3 upon accessing property or signature
|
|||
var r2 = e2();
|
||||
>r2 : number
|
||||
>e2() : number
|
||||
>e2 : I2 | I3
|
||||
>e2 : I3
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ var t: Class | Property;
|
|||
>Property : Property
|
||||
|
||||
t.parent;
|
||||
>t.parent : Namespace | Module | Class
|
||||
>t.parent : Namespace | Class
|
||||
>t : Class | Property
|
||||
>parent : Namespace | Module | Class
|
||||
>parent : Namespace | Class
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ goTo.marker('1');
|
|||
verify.quickInfoIs('var c: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('var c1: ({\n name: string;\n age: number;\n} | {\n name: string;\n age: number;\n dob: Date;\n})[]');
|
||||
verify.quickInfoIs('var c1: {\n name: string;\n age: number;\n}[]');
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('var c2: ({\n\
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
///<reference path="fourslash.ts" />
|
||||
|
||||
////interface One {
|
||||
//// commonProperty: number;
|
||||
//// commonProperty: string;
|
||||
//// commonFunction(): number;
|
||||
////}
|
||||
////
|
||||
////interface Two {
|
||||
//// commonProperty: string
|
||||
//// commonProperty: number;
|
||||
//// commonFunction(): number;
|
||||
////}
|
||||
////
|
||||
|
@ -16,5 +16,5 @@
|
|||
|
||||
goTo.marker();
|
||||
verify.memberListContains("toString", "(method) toString(): string");
|
||||
verify.memberListContains("valueOf", "(method) valueOf(): number | string");
|
||||
verify.memberListContains("valueOf", "(method) valueOf(): string | number");
|
||||
verify.memberListCount(2);
|
|
@ -43,21 +43,13 @@ goTo.marker('4');
|
|||
verify.quickInfoIs('var r4: C');
|
||||
|
||||
goTo.marker('5');
|
||||
verify.quickInfoIs('var x5: ({\n\
|
||||
verify.quickInfoIs('var x5: {\n\
|
||||
name: string;\n\
|
||||
age: number;\n\
|
||||
} | {\n\
|
||||
name: string;\n\
|
||||
age: number;\n\
|
||||
dob: Date;\n\
|
||||
})[]');
|
||||
}[]');
|
||||
|
||||
goTo.marker('6');
|
||||
verify.quickInfoIs('var r5: {\n\
|
||||
name: string;\n\
|
||||
age: number;\n\
|
||||
} | {\n\
|
||||
name: string;\n\
|
||||
age: number;\n\
|
||||
dob: Date;\n\
|
||||
}');
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
////let w= `bar${3}`/*4*/
|
||||
////String.raw
|
||||
//// `template`/*5*/
|
||||
////String.raw`foo`/*6*/
|
||||
////String.raw `bar${3}`/*7*/
|
||||
|
||||
|
||||
goTo.marker("1");
|
||||
|
@ -25,4 +27,10 @@ verify.currentLineContentIs("let w = `bar${3}`;");
|
|||
|
||||
goTo.marker("5");
|
||||
edit.insert(";");
|
||||
verify.currentLineContentIs(" `template`;");
|
||||
verify.currentLineContentIs(" `template`;");
|
||||
goTo.marker("6");
|
||||
edit.insert(";");
|
||||
verify.currentLineContentIs("String.raw `foo`;");
|
||||
goTo.marker("7");
|
||||
edit.insert(";");
|
||||
verify.currentLineContentIs("String.raw `bar${3}`;");
|
|
@ -0,0 +1,56 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = class C {
|
||||
//// public x;
|
||||
//// public y;
|
||||
//// public z;
|
||||
//// public staticX;
|
||||
//// constructor() {
|
||||
//// this;
|
||||
//// this.x;
|
||||
//// this.y;
|
||||
//// this.z;
|
||||
//// }
|
||||
//// foo() {
|
||||
//// this;
|
||||
//// () => this;
|
||||
//// () => {
|
||||
//// if (this) {
|
||||
//// this;
|
||||
//// }
|
||||
//// }
|
||||
//// function inside() {
|
||||
//// this;
|
||||
//// (function (_) {
|
||||
//// this;
|
||||
//// })(this);
|
||||
//// }
|
||||
//// return this.x;
|
||||
//// }
|
||||
////
|
||||
//// static bar() {
|
||||
//// [|this|];
|
||||
//// [|this|].staticX;
|
||||
//// () => [|this|];
|
||||
//// () => {
|
||||
//// if ([|this|]) {
|
||||
//// [|this|];
|
||||
//// }
|
||||
//// }
|
||||
//// function inside() {
|
||||
//// this;
|
||||
//// (function (_) {
|
||||
//// this;
|
||||
//// })(this);
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
|
||||
const ranges = test.ranges();
|
||||
for (let r of ranges) {
|
||||
goTo.position(r.start);
|
||||
|
||||
for (let range of ranges) {
|
||||
verify.occurrencesAtPositionContains(range, false);
|
||||
}
|
||||
}
|
54
tests/cases/fourslash/getOccurrencesClassExpressionThis.ts
Normal file
54
tests/cases/fourslash/getOccurrencesClassExpressionThis.ts
Normal file
|
@ -0,0 +1,54 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = class C {
|
||||
//// public x;
|
||||
//// public y;
|
||||
//// public z;
|
||||
//// constructor() {
|
||||
//// [|this|];
|
||||
//// [|this|].x;
|
||||
//// [|this|].y;
|
||||
//// [|this|].z;
|
||||
//// }
|
||||
//// foo() {
|
||||
//// [|this|];
|
||||
//// () => [|this|];
|
||||
//// () => {
|
||||
//// if ([|this|]) {
|
||||
//// [|this|];
|
||||
//// }
|
||||
//// }
|
||||
//// function inside() {
|
||||
//// this;
|
||||
//// (function (_) {
|
||||
//// this;
|
||||
//// })(this);
|
||||
//// }
|
||||
//// return [|this|].x;
|
||||
//// }
|
||||
////
|
||||
//// static bar() {
|
||||
//// this;
|
||||
//// () => this;
|
||||
//// () => {
|
||||
//// if (this) {
|
||||
//// this;
|
||||
//// }
|
||||
//// }
|
||||
//// function inside() {
|
||||
//// this;
|
||||
//// (function (_) {
|
||||
//// this;
|
||||
//// })(this);
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
|
||||
const ranges = test.ranges();
|
||||
for (let r of ranges) {
|
||||
goTo.position(r.start);
|
||||
|
||||
for (let range of ranges) {
|
||||
verify.occurrencesAtPositionContains(range, false);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue