mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into fixInstanceOfFunction
This commit is contained in:
@@ -16,7 +16,7 @@ Please fill in the *entire* template below.
|
||||
-->
|
||||
|
||||
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
|
||||
**TypeScript Version:** 3.1.0-dev.201xxxxx
|
||||
**TypeScript Version:** 3.2.0-dev.201xxxxx
|
||||
|
||||
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
|
||||
**Search Terms:**
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "http://typescriptlang.org/",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
|
||||
+39
-19
@@ -77,6 +77,7 @@ namespace ts {
|
||||
const allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions);
|
||||
const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks");
|
||||
const strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes");
|
||||
const strictBindCallApply = getStrictOptionValue(compilerOptions, "strictBindCallApply");
|
||||
const strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization");
|
||||
const noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
|
||||
const noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
|
||||
@@ -476,6 +477,8 @@ namespace ts {
|
||||
|
||||
let globalObjectType: ObjectType;
|
||||
let globalFunctionType: ObjectType;
|
||||
let globalCallableFunctionType: ObjectType;
|
||||
let globalNewableFunctionType: ObjectType;
|
||||
let globalArrayType: GenericType;
|
||||
let globalReadonlyArrayType: GenericType;
|
||||
let globalStringType: ObjectType;
|
||||
@@ -1708,7 +1711,9 @@ namespace ts {
|
||||
function checkResolvedBlockScopedVariable(result: Symbol, errorLocation: Node): void {
|
||||
Debug.assert(!!(result.flags & SymbolFlags.BlockScopedVariable || result.flags & SymbolFlags.Class || result.flags & SymbolFlags.Enum));
|
||||
// Block-scoped variables cannot be used before their definition
|
||||
const declaration = forEach(result.declarations, d => isBlockOrCatchScoped(d) || isClassLike(d) || (d.kind === SyntaxKind.EnumDeclaration) ? d : undefined);
|
||||
const declaration = find(
|
||||
result.declarations,
|
||||
d => isBlockOrCatchScoped(d) || isClassLike(d) || (d.kind === SyntaxKind.EnumDeclaration) || isInJSFile(d) && !!getJSDocEnumTag(d));
|
||||
|
||||
if (declaration === undefined) return Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
|
||||
|
||||
@@ -7391,8 +7396,12 @@ namespace ts {
|
||||
if (symbol && symbolIsValue(symbol)) {
|
||||
return symbol;
|
||||
}
|
||||
if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) {
|
||||
const symbol = getPropertyOfObjectType(globalFunctionType, name);
|
||||
const functionType = resolved === anyFunctionType ? globalFunctionType :
|
||||
resolved.callSignatures.length ? globalCallableFunctionType :
|
||||
resolved.constructSignatures.length ? globalNewableFunctionType :
|
||||
undefined;
|
||||
if (functionType) {
|
||||
const symbol = getPropertyOfObjectType(functionType, name);
|
||||
if (symbol) {
|
||||
return symbol;
|
||||
}
|
||||
@@ -13250,10 +13259,8 @@ namespace ts {
|
||||
const targetCount = getParameterCount(target);
|
||||
const sourceRestType = getEffectiveRestType(source);
|
||||
const targetRestType = getEffectiveRestType(target);
|
||||
const paramCount = targetRestType ? Math.min(targetCount - 1, sourceCount) :
|
||||
sourceRestType ? targetCount :
|
||||
Math.min(sourceCount, targetCount);
|
||||
|
||||
const targetNonRestCount = targetRestType ? targetCount - 1 : targetCount;
|
||||
const paramCount = sourceRestType ? targetNonRestCount : Math.min(sourceCount, targetNonRestCount);
|
||||
const sourceThisType = getThisTypeOfSignature(source);
|
||||
if (sourceThisType) {
|
||||
const targetThisType = getThisTypeOfSignature(target);
|
||||
@@ -13900,15 +13907,17 @@ namespace ts {
|
||||
if (!inferredType) {
|
||||
const signature = context.signature;
|
||||
if (signature) {
|
||||
if (inference.contraCandidates && (!inference.candidates || inference.candidates.length === 1 && inference.candidates[0].flags & TypeFlags.Never)) {
|
||||
// If we have contravariant inferences, but no covariant inferences or a single
|
||||
// covariant inference of 'never', we find the best common subtype and treat that
|
||||
// as a single covariant candidate.
|
||||
inference.candidates = [getContravariantInference(inference)];
|
||||
inference.contraCandidates = undefined;
|
||||
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : undefined;
|
||||
if (inference.contraCandidates) {
|
||||
const inferredContravariantType = getContravariantInference(inference);
|
||||
// If we have both co- and contra-variant inferences, we prefer the contra-variant inference
|
||||
// unless the co-variant inference is a subtype and not 'never'.
|
||||
inferredType = inferredCovariantType && !(inferredCovariantType.flags & TypeFlags.Never) &&
|
||||
isTypeSubtypeOf(inferredCovariantType, inferredContravariantType) ?
|
||||
inferredCovariantType : inferredContravariantType;
|
||||
}
|
||||
if (inference.candidates) {
|
||||
inferredType = getCovariantInference(inference, signature);
|
||||
else if (inferredCovariantType) {
|
||||
inferredType = inferredCovariantType;
|
||||
}
|
||||
else if (context.flags & InferenceFlags.NoDefault) {
|
||||
// We use silentNeverType as the wildcard that signals no inferences.
|
||||
@@ -19684,7 +19693,10 @@ namespace ts {
|
||||
checkCandidate = candidate;
|
||||
}
|
||||
if (!checkApplicableSignature(node, args, checkCandidate, relation, excludeArgument, /*reportErrors*/ false)) {
|
||||
candidateForArgumentError = checkCandidate;
|
||||
// Give preference to error candidates that have no rest parameters (as they are more specific)
|
||||
if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) {
|
||||
candidateForArgumentError = checkCandidate;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (excludeArgument) {
|
||||
@@ -19697,7 +19709,10 @@ namespace ts {
|
||||
checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration));
|
||||
}
|
||||
if (!checkApplicableSignature(node, args, checkCandidate, relation, excludeArgument, /*reportErrors*/ false)) {
|
||||
candidateForArgumentError = checkCandidate;
|
||||
// Give preference to error candidates that have no rest parameters (as they are more specific)
|
||||
if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) {
|
||||
candidateForArgumentError = checkCandidate;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -28029,8 +28044,11 @@ namespace ts {
|
||||
function getAugmentedPropertiesOfType(type: Type): Symbol[] {
|
||||
type = getApparentType(type);
|
||||
const propsByName = createSymbolTable(getPropertiesOfType(type));
|
||||
if (typeHasCallOrConstructSignatures(type)) {
|
||||
forEach(getPropertiesOfType(globalFunctionType), p => {
|
||||
const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType :
|
||||
getSignaturesOfType(type, SignatureKind.Construct).length ? globalNewableFunctionType :
|
||||
undefined;
|
||||
if (functionType) {
|
||||
forEach(getPropertiesOfType(functionType), p => {
|
||||
if (!propsByName.has(p.escapedName)) {
|
||||
propsByName.set(p.escapedName, p);
|
||||
}
|
||||
@@ -28810,6 +28828,8 @@ namespace ts {
|
||||
globalArrayType = getGlobalType("Array" as __String, /*arity*/ 1, /*reportErrors*/ true);
|
||||
globalObjectType = getGlobalType("Object" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
globalFunctionType = getGlobalType("Function" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
globalCallableFunctionType = strictBindCallApply && getGlobalType("CallableFunction" as __String, /*arity*/ 0, /*reportErrors*/ true) || globalFunctionType;
|
||||
globalNewableFunctionType = strictBindCallApply && getGlobalType("NewableFunction" as __String, /*arity*/ 0, /*reportErrors*/ true) || globalFunctionType;
|
||||
globalStringType = getGlobalType("String" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
globalNumberType = getGlobalType("Number" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
globalBooleanType = getGlobalType("Boolean" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
|
||||
@@ -373,6 +373,14 @@ namespace ts {
|
||||
category: Diagnostics.Strict_Type_Checking_Options,
|
||||
description: Diagnostics.Enable_strict_checking_of_function_types
|
||||
},
|
||||
{
|
||||
name: "strictBindCallApply",
|
||||
type: "boolean",
|
||||
strictFlag: true,
|
||||
showInSimplifiedHelpView: true,
|
||||
category: Diagnostics.Strict_Type_Checking_Options,
|
||||
description: Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions
|
||||
},
|
||||
{
|
||||
name: "strictPropertyInitialization",
|
||||
type: "boolean",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace ts {
|
||||
// WARNING: The script `configureNightly.ts` uses a regexp to parse out these values.
|
||||
// If changing the text in this section, be sure to test `configureNightly` too.
|
||||
export const versionMajorMinor = "3.1";
|
||||
export const versionMajorMinor = "3.2";
|
||||
/** The version of the TypeScript compiler release */
|
||||
export const version = `${versionMajorMinor}.0-dev`;
|
||||
}
|
||||
|
||||
@@ -3759,6 +3759,10 @@
|
||||
"category": "Message",
|
||||
"code": 6213
|
||||
},
|
||||
"Enable strict 'bind', 'call', and 'apply' methods on functions.": {
|
||||
"category": "Message",
|
||||
"code": 6214
|
||||
},
|
||||
|
||||
"Projects to reference": {
|
||||
"category": "Message",
|
||||
|
||||
@@ -4427,6 +4427,7 @@ namespace ts {
|
||||
sourceRoot?: string;
|
||||
strict?: boolean;
|
||||
strictFunctionTypes?: boolean; // Always combine with strict property
|
||||
strictBindCallApply?: boolean; // Always combine with strict property
|
||||
strictNullChecks?: boolean; // Always combine with strict property
|
||||
strictPropertyInitialization?: boolean; // Always combine with strict property
|
||||
stripInternal?: boolean;
|
||||
|
||||
@@ -7085,7 +7085,7 @@ namespace ts {
|
||||
return !!(compilerOptions.declaration || compilerOptions.composite);
|
||||
}
|
||||
|
||||
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictPropertyInitialization" | "alwaysStrict";
|
||||
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictBindCallApply" | "strictPropertyInitialization" | "alwaysStrict";
|
||||
|
||||
export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean {
|
||||
return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag];
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace ts.TestFSWithWatch {
|
||||
content: `/// <reference no-default-lib="true"/>
|
||||
interface Boolean {}
|
||||
interface Function {}
|
||||
interface CallableFunction {}
|
||||
interface NewableFunction {}
|
||||
interface IArguments {}
|
||||
interface Number { toExponential: any; }
|
||||
interface Object {}
|
||||
|
||||
Vendored
+60
@@ -295,6 +295,66 @@ interface FunctionConstructor {
|
||||
|
||||
declare const Function: FunctionConstructor;
|
||||
|
||||
interface CallableFunction extends Function {
|
||||
/**
|
||||
* Calls the function with the specified object as the this value and the elements of specified array as the arguments.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args An array of argument values to be passed to the function.
|
||||
*/
|
||||
apply<T, R>(this: (this: T) => R, thisArg: T): R;
|
||||
apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
|
||||
|
||||
/**
|
||||
* Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args Argument values to be passed to the function.
|
||||
*/
|
||||
call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
|
||||
|
||||
/**
|
||||
* For a given function, creates a bound function that has the same body as the original function.
|
||||
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args Arguments to bind to the parameters of the function.
|
||||
*/
|
||||
bind<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R;
|
||||
bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
|
||||
bind<T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R;
|
||||
bind<T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R;
|
||||
bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R;
|
||||
bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
|
||||
}
|
||||
|
||||
interface NewableFunction extends Function {
|
||||
/**
|
||||
* Calls the function with the specified object as the this value and the elements of specified array as the arguments.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args An array of argument values to be passed to the function.
|
||||
*/
|
||||
apply<T>(this: new () => T, thisArg: T): void;
|
||||
apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
|
||||
|
||||
/**
|
||||
* Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args Argument values to be passed to the function.
|
||||
*/
|
||||
call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
|
||||
|
||||
/**
|
||||
* For a given function, creates a bound function that has the same body as the original function.
|
||||
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
||||
* @param thisArg The object to be used as the this object.
|
||||
* @param args Arguments to bind to the parameters of the function.
|
||||
*/
|
||||
bind<A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R;
|
||||
bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
|
||||
bind<A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R;
|
||||
bind<A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R;
|
||||
bind<A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R;
|
||||
bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
|
||||
}
|
||||
|
||||
interface IArguments {
|
||||
[index: number]: any;
|
||||
length: number;
|
||||
|
||||
@@ -1167,8 +1167,8 @@ namespace ts.server {
|
||||
return { info: renameInfo, locs: this.toSpanGroups(locations) };
|
||||
}
|
||||
|
||||
private mapRenameInfo({ canRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan }: RenameInfo, scriptInfo: ScriptInfo): protocol.RenameInfo {
|
||||
return { canRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: this.toLocationTextSpan(triggerSpan, scriptInfo) };
|
||||
private mapRenameInfo({ canRename, fileToRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan }: RenameInfo, scriptInfo: ScriptInfo): protocol.RenameInfo {
|
||||
return { canRename, fileToRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: this.toLocationTextSpan(triggerSpan, scriptInfo) };
|
||||
}
|
||||
|
||||
private toSpanGroups(locations: ReadonlyArray<RenameLocation>): ReadonlyArray<protocol.SpanGroup> {
|
||||
|
||||
@@ -8294,6 +8294,7 @@ namespace ts.projectSystem {
|
||||
info: {
|
||||
canRename: true,
|
||||
displayName: "C",
|
||||
fileToRename: undefined,
|
||||
fullDisplayName: '"/users/username/projects/a/c/fc".C',
|
||||
kind: ScriptElementKind.constElement,
|
||||
kindModifiers: ScriptElementKindModifier.exportedModifier,
|
||||
@@ -9462,8 +9463,7 @@ export function Test2() {
|
||||
content: "{}",
|
||||
};
|
||||
|
||||
const host = createServerHost([aTs, bTs, tsconfig]);
|
||||
const session = createSession(host);
|
||||
const session = createSession(createServerHost([aTs, bTs, tsconfig]));
|
||||
openFilesForSession([aTs, bTs], session);
|
||||
|
||||
const requestLocation: protocol.FileLocationRequestArgs = {
|
||||
@@ -9569,6 +9569,31 @@ export function Test2() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("tsserverProjectSystem rename", () => {
|
||||
it("works", () => {
|
||||
const aTs: File = { path: "/a.ts", content: "export const a = 0;" };
|
||||
const bTs: File = { path: "/b.ts", content: 'import { a } from "./a";' };
|
||||
|
||||
const session = createSession(createServerHost([aTs, bTs]));
|
||||
openFilesForSession([bTs], session);
|
||||
|
||||
const response = executeSessionRequest<protocol.RenameRequest, protocol.RenameResponse>(session, protocol.CommandTypes.Rename, protocolFileLocationFromSubstring(bTs, 'a";'));
|
||||
assert.deepEqual<protocol.RenameResponseBody | undefined>(response, {
|
||||
info: {
|
||||
canRename: true,
|
||||
fileToRename: aTs.path,
|
||||
displayName: aTs.path,
|
||||
fullDisplayName: aTs.path,
|
||||
kind: ScriptElementKind.moduleElement,
|
||||
kindModifiers: "",
|
||||
localizedErrorMessage: undefined,
|
||||
triggerSpan: protocolTextSpanFromSubstring(bTs.content, "a", { index: 1 }),
|
||||
},
|
||||
locs: [{ file: bTs.path, locs: [protocolTextSpanFromSubstring(bTs.content, "./a")] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("tsserverProjectSystem typeReferenceDirectives", () => {
|
||||
it("when typeReferenceDirective contains UpperCasePackage", () => {
|
||||
const projectLocation = "/user/username/projects/myproject";
|
||||
@@ -10062,6 +10087,7 @@ declare class TestLib {
|
||||
info: {
|
||||
canRename: true,
|
||||
displayName: "fnA",
|
||||
fileToRename: undefined,
|
||||
fullDisplayName: "fnA",
|
||||
kind: ScriptElementKind.alias,
|
||||
kindModifiers: ScriptElementKindModifier.none,
|
||||
@@ -10081,6 +10107,7 @@ declare class TestLib {
|
||||
info: {
|
||||
canRename: true,
|
||||
displayName: "fnA",
|
||||
fileToRename: undefined,
|
||||
fullDisplayName: '"/a/a".fnA',
|
||||
kind: ScriptElementKind.functionElement,
|
||||
kindModifiers: ScriptElementKindModifier.exportedModifier,
|
||||
@@ -10110,6 +10137,7 @@ declare class TestLib {
|
||||
info: {
|
||||
canRename: true,
|
||||
displayName: "fnB",
|
||||
fileToRename: undefined,
|
||||
fullDisplayName: "fnB",
|
||||
kind: ScriptElementKind.alias,
|
||||
kindModifiers: ScriptElementKindModifier.none,
|
||||
|
||||
+2
-1
@@ -14,7 +14,7 @@ and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.1";
|
||||
const versionMajorMinor = "3.2";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
@@ -2494,6 +2494,7 @@ declare namespace ts {
|
||||
sourceRoot?: string;
|
||||
strict?: boolean;
|
||||
strictFunctionTypes?: boolean;
|
||||
strictBindCallApply?: boolean;
|
||||
strictNullChecks?: boolean;
|
||||
strictPropertyInitialization?: boolean;
|
||||
stripInternal?: boolean;
|
||||
|
||||
+2
-1
@@ -14,7 +14,7 @@ and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.1";
|
||||
const versionMajorMinor = "3.2";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
@@ -2494,6 +2494,7 @@ declare namespace ts {
|
||||
sourceRoot?: string;
|
||||
strict?: boolean;
|
||||
strictFunctionTypes?: boolean;
|
||||
strictBindCallApply?: boolean;
|
||||
strictNullChecks?: boolean;
|
||||
strictPropertyInitialization?: boolean;
|
||||
stripInternal?: boolean;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
error TS2318: Cannot find global type 'CallableFunction'.
|
||||
error TS2318: Cannot find global type 'NewableFunction'.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'CallableFunction'.
|
||||
!!! error TS2318: Cannot find global type 'NewableFunction'.
|
||||
==== tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx (0 errors) ====
|
||||
interface A { isIt: true; text: string; }
|
||||
interface B { isIt: false; value: number; }
|
||||
type C = A | B;
|
||||
const isIt = Math.random() > 0.5;
|
||||
const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 };
|
||||
const cc: C = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 };
|
||||
|
||||
type ComponentProps =
|
||||
| {
|
||||
optionalBool: true;
|
||||
mandatoryFn: () => void;
|
||||
}
|
||||
| {
|
||||
optionalBool: false;
|
||||
};
|
||||
|
||||
let Funk = (_props: ComponentProps) => <div>Hello</div>;
|
||||
|
||||
let Fail1 = () => <Funk mandatoryFn={() => { }} optionalBool={true} />
|
||||
let Fail2 = () => <Funk mandatoryFn={() => { }} optionalBool={true as true} />
|
||||
let True = true as true;
|
||||
let Fail3 = () => <Funk mandatoryFn={() => { }} optionalBool={True} />
|
||||
let attrs2 = { optionalBool: true as true, mandatoryFn: () => { } }
|
||||
let Success = () => <Funk {...attrs2} />
|
||||
@@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(
|
||||
a1(...array2); // Error parameter type is (number|string)[]
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:1298:15: 'Array' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:1358:15: 'Array' is declared here.
|
||||
a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]]
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type '[[any]]'.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/jsdoc/bug27134.js ===
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
var foo = { };
|
||||
>foo : Symbol(foo, Decl(bug27134.js, 3, 3))
|
||||
|
||||
/**
|
||||
* @type {foo}
|
||||
*/
|
||||
var s;
|
||||
>s : Symbol(s, Decl(bug27134.js, 8, 3))
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
=== tests/cases/conformance/jsdoc/bug27134.js ===
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
var foo = { };
|
||||
>foo : typeof foo
|
||||
>{ } : {}
|
||||
|
||||
/**
|
||||
* @type {foo}
|
||||
*/
|
||||
var s;
|
||||
>s : number
|
||||
|
||||
@@ -69,20 +69,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat
|
||||
var d=new XDate();
|
||||
~~~~~
|
||||
!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here.
|
||||
d.getDay();
|
||||
d=new XDate(1978,2);
|
||||
~~~~~
|
||||
!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here.
|
||||
d.getXDate();
|
||||
var n=XDate.parse("3/2/2004");
|
||||
~~~~~
|
||||
!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here.
|
||||
n=XDate.UTC(1964,2,1);
|
||||
~~~~~
|
||||
!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here.
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,6): error TS2345: Argument of type '(x: number, y: number) => number' is not assignable to parameter of type '() => void'.
|
||||
tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,1): error TS2554: Expected 3 arguments, but got 1.
|
||||
tests/cases/conformance/types/rest/genericRestArityStrict.ts(8,1): error TS2554: Expected 3 arguments, but got 8.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/rest/genericRestArityStrict.ts (1 errors) ====
|
||||
==== tests/cases/conformance/types/rest/genericRestArityStrict.ts (2 errors) ====
|
||||
// Repro from #25559
|
||||
|
||||
declare function call<TS extends unknown[]>(
|
||||
@@ -9,7 +10,10 @@ tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,6): error TS2345:
|
||||
...args: TS): void;
|
||||
|
||||
call((x: number, y: number) => x + y);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y: number) => number' is not assignable to parameter of type '() => void'.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 1.
|
||||
!!! related TS6210 tests/cases/conformance/types/rest/genericRestArityStrict.ts:5:5: An argument for 'args' was not provided.
|
||||
call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 8.
|
||||
|
||||
@@ -22,7 +22,7 @@ call((x: number, y: number) => x + y);
|
||||
>y : number
|
||||
|
||||
call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7);
|
||||
>call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : void
|
||||
>call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : any
|
||||
>call : <TS extends unknown[]>(handler: (...args: TS) => void, ...args: TS) => void
|
||||
>(x: number, y: number) => x + y : (x: number, y: number) => number
|
||||
>x : number
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(20,46): error TS2322: Type '"y"' is not assignable to type '"x"'.
|
||||
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
|
||||
Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
|
||||
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
|
||||
Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
|
||||
Types of parameters 'p' and 'x' are incompatible.
|
||||
Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
|
||||
Types of property 'prop' are incompatible.
|
||||
Type '"x" | "y"' is not assignable to type '"x"'.
|
||||
Type '"y"' is not assignable to type '"x"'.
|
||||
Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'.
|
||||
Type '"y"' is not assignable to type '"x"'.
|
||||
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,21): error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
|
||||
Type '{ children: () => number; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
|
||||
Types of property 'children' are incompatible.
|
||||
@@ -41,15 +37,11 @@ tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,21): error TS2322:
|
||||
!!! related TS6502 tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx:13:44: The expected type comes from the return type of this signature.
|
||||
const argchild = <ElemLit prop="x">{p => "y"}</ElemLit>
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
|
||||
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
|
||||
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
|
||||
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
|
||||
!!! error TS2322: Types of parameters 'p' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
|
||||
!!! error TS2322: Types of property 'prop' are incompatible.
|
||||
!!! error TS2322: Type '"x" | "y"' is not assignable to type '"x"'.
|
||||
!!! error TS2322: Type '"y"' is not assignable to type '"x"'.
|
||||
!!! error TS2322: Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'.
|
||||
!!! error TS2322: Type '"y"' is not assignable to type '"x"'.
|
||||
const mismatched = <ElemLit prop="x">{() => 12}</ElemLit>
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t
|
||||
Math.sign(1);
|
||||
~~~~
|
||||
!!! error TS2551: Property 'sign' does not exist on type 'Math'. Did you mean 'sin'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:643:5: 'sin' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:703:5: 'sin' is declared here.
|
||||
|
||||
// Using ES6 object
|
||||
var o = {
|
||||
|
||||
@@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17)
|
||||
err.massage; // ERROR: Property 'massage' does not exist on type 'Error'
|
||||
~~~~~~~
|
||||
!!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here.
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
@@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS
|
||||
x.mesage;
|
||||
~~~~~~
|
||||
!!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here.
|
||||
}
|
||||
|
||||
if (x instanceof Date) {
|
||||
@@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS
|
||||
x.getHuors();
|
||||
~~~~~~~~
|
||||
!!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:693:5: 'getHours' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:753:5: 'getHours' is declared here.
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error
|
||||
x.mesage;
|
||||
~~~~~~
|
||||
!!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here.
|
||||
}
|
||||
|
||||
if (isDate(x)) {
|
||||
@@ -47,6 +47,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error
|
||||
x.getHuors();
|
||||
~~~~~~~~
|
||||
!!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:693:5: 'getHours' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:753:5: 'getHours' is declared here.
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2552: Cannot find name 'toString'. Did you mean 'String'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:457:15: 'String' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:517:15: 'String' is declared here.
|
||||
@@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS
|
||||
$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
@@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS
|
||||
$ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS
|
||||
$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
|
||||
@@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T
|
||||
$ERROR('#А');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0411 = 1;
|
||||
if (Б !== 1) {
|
||||
$ERROR('#Б');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0412 = 1;
|
||||
if (В !== 1) {
|
||||
$ERROR('#В');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0413 = 1;
|
||||
if (Г !== 1) {
|
||||
$ERROR('#Г');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0414 = 1;
|
||||
if (Д !== 1) {
|
||||
$ERROR('#Д');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0415 = 1;
|
||||
if (Е !== 1) {
|
||||
$ERROR('#Е');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0416 = 1;
|
||||
if (Ж !== 1) {
|
||||
$ERROR('#Ж');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0417 = 1;
|
||||
if (З !== 1) {
|
||||
$ERROR('#З');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0418 = 1;
|
||||
if (И !== 1) {
|
||||
$ERROR('#И');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0419 = 1;
|
||||
if (Й !== 1) {
|
||||
$ERROR('#Й');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u041A = 1;
|
||||
if (К !== 1) {
|
||||
|
||||
@@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552
|
||||
$ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
$ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
|
||||
}
|
||||
@@ -26,5 +26,5 @@ tests/cases/compiler/promiseTypeInference.ts(10,39): error TS2322: Type 'IPromis
|
||||
!!! error TS2322: Types of parameters 'success' and 'onfulfilled' are incompatible.
|
||||
!!! error TS2322: Type 'TResult1 | PromiseLike<TResult1>' is not assignable to type 'IPromise<TResult1 | TResult2>'.
|
||||
!!! error TS2322: Type 'TResult1' is not assignable to type 'IPromise<TResult1 | TResult2>'.
|
||||
!!! related TS6502 /.ts/lib.es5.d.ts:1336:57: The expected type comes from the return type of this signature.
|
||||
!!! related TS6502 /.ts/lib.es5.d.ts:1396:57: The expected type comes from the return type of this signature.
|
||||
|
||||
@@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error
|
||||
$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
@@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error
|
||||
$ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error
|
||||
$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x));
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
|
||||
|
||||
@@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error
|
||||
$ERROR('#А');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0411 = 1;
|
||||
if (Б !== 1) {
|
||||
$ERROR('#Б');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0412 = 1;
|
||||
if (В !== 1) {
|
||||
$ERROR('#В');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0413 = 1;
|
||||
if (Г !== 1) {
|
||||
$ERROR('#Г');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0414 = 1;
|
||||
if (Д !== 1) {
|
||||
$ERROR('#Д');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0415 = 1;
|
||||
if (Е !== 1) {
|
||||
$ERROR('#Е');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0416 = 1;
|
||||
if (Ж !== 1) {
|
||||
$ERROR('#Ж');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0417 = 1;
|
||||
if (З !== 1) {
|
||||
$ERROR('#З');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0418 = 1;
|
||||
if (И !== 1) {
|
||||
$ERROR('#И');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u0419 = 1;
|
||||
if (Й !== 1) {
|
||||
$ERROR('#Й');
|
||||
~~~~~~
|
||||
!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'?
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here.
|
||||
!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here.
|
||||
}
|
||||
var \u041A = 1;
|
||||
if (К !== 1) {
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(6,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(9,11): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(10,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(14,32): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
Property '1' is missing in type '[number]'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(15,37): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(16,32): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
Types of property 'length' are incompatible.
|
||||
Type '3' is not assignable to type '2'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(29,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(30,22): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(33,11): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(34,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(35,11): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(36,22): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(39,26): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(40,31): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(41,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(42,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(47,33): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(50,1): error TS2554: Expected 3 arguments, but got 2.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(51,15): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(52,1): error TS2554: Expected 3 arguments, but got 4.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(55,12): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(56,17): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/functions/strictBindCallApply1.ts(57,12): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/functions/strictBindCallApply1.ts (24 errors) ====
|
||||
declare function foo(a: number, b: string): string;
|
||||
|
||||
let f00 = foo.bind(undefined);
|
||||
let f01 = foo.bind(undefined, 10);
|
||||
let f02 = foo.bind(undefined, 10, "hello");
|
||||
let f03 = foo.bind(undefined, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
let c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 4.
|
||||
|
||||
let a00 = foo.apply(undefined, [10, "hello"]);
|
||||
let a01 = foo.apply(undefined, [10]); // Error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
!!! error TS2345: Property '1' is missing in type '[number]'.
|
||||
let a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
let a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
!!! error TS2345: Types of property 'length' are incompatible.
|
||||
!!! error TS2345: Type '3' is not assignable to type '2'.
|
||||
|
||||
class C {
|
||||
constructor(a: number, b: string) {}
|
||||
foo(this: this, a: number, b: string): string { return "" }
|
||||
}
|
||||
|
||||
declare let c: C;
|
||||
declare let obj: {};
|
||||
|
||||
let f10 = c.foo.bind(c);
|
||||
let f11 = c.foo.bind(c, 10);
|
||||
let f12 = c.foo.bind(c, 10, "hello");
|
||||
let f13 = c.foo.bind(c, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
let f14 = c.foo.bind(undefined); // Error
|
||||
~~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
let c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 4.
|
||||
let c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
~~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
|
||||
let a10 = c.foo.apply(c, [10, "hello"]);
|
||||
let a11 = c.foo.apply(c, [10]); // Error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
let a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
let a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
let a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
~~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
|
||||
|
||||
let f20 = C.bind(undefined);
|
||||
let f21 = C.bind(undefined, 10);
|
||||
let f22 = C.bind(undefined, 10, "hello");
|
||||
let f23 = C.bind(undefined, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
|
||||
C.call(c, 10, "hello");
|
||||
C.call(c, 10); // Error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 2.
|
||||
C.call(c, 10, 20); // Error
|
||||
~~
|
||||
!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'.
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2554: Expected 3 arguments, but got 4.
|
||||
|
||||
C.apply(c, [10, "hello"]);
|
||||
C.apply(c, [10]); // Error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'.
|
||||
C.apply(c, [10, 20]); // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//// [strictBindCallApply1.ts]
|
||||
declare function foo(a: number, b: string): string;
|
||||
|
||||
let f00 = foo.bind(undefined);
|
||||
let f01 = foo.bind(undefined, 10);
|
||||
let f02 = foo.bind(undefined, 10, "hello");
|
||||
let f03 = foo.bind(undefined, 10, 20); // Error
|
||||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
let c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
|
||||
let a00 = foo.apply(undefined, [10, "hello"]);
|
||||
let a01 = foo.apply(undefined, [10]); // Error
|
||||
let a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
let a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
|
||||
class C {
|
||||
constructor(a: number, b: string) {}
|
||||
foo(this: this, a: number, b: string): string { return "" }
|
||||
}
|
||||
|
||||
declare let c: C;
|
||||
declare let obj: {};
|
||||
|
||||
let f10 = c.foo.bind(c);
|
||||
let f11 = c.foo.bind(c, 10);
|
||||
let f12 = c.foo.bind(c, 10, "hello");
|
||||
let f13 = c.foo.bind(c, 10, 20); // Error
|
||||
let f14 = c.foo.bind(undefined); // Error
|
||||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
let c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
let c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
|
||||
let a10 = c.foo.apply(c, [10, "hello"]);
|
||||
let a11 = c.foo.apply(c, [10]); // Error
|
||||
let a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
let a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
let a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
|
||||
let f20 = C.bind(undefined);
|
||||
let f21 = C.bind(undefined, 10);
|
||||
let f22 = C.bind(undefined, 10, "hello");
|
||||
let f23 = C.bind(undefined, 10, 20); // Error
|
||||
|
||||
C.call(c, 10, "hello");
|
||||
C.call(c, 10); // Error
|
||||
C.call(c, 10, 20); // Error
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
|
||||
C.apply(c, [10, "hello"]);
|
||||
C.apply(c, [10]); // Error
|
||||
C.apply(c, [10, 20]); // Error
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
|
||||
|
||||
//// [strictBindCallApply1.js]
|
||||
"use strict";
|
||||
var f00 = foo.bind(undefined);
|
||||
var f01 = foo.bind(undefined, 10);
|
||||
var f02 = foo.bind(undefined, 10, "hello");
|
||||
var f03 = foo.bind(undefined, 10, 20); // Error
|
||||
var c00 = foo.call(undefined, 10, "hello");
|
||||
var c01 = foo.call(undefined, 10); // Error
|
||||
var c02 = foo.call(undefined, 10, 20); // Error
|
||||
var c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
var a00 = foo.apply(undefined, [10, "hello"]);
|
||||
var a01 = foo.apply(undefined, [10]); // Error
|
||||
var a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
var a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
var C = /** @class */ (function () {
|
||||
function C(a, b) {
|
||||
}
|
||||
C.prototype.foo = function (a, b) { return ""; };
|
||||
return C;
|
||||
}());
|
||||
var f10 = c.foo.bind(c);
|
||||
var f11 = c.foo.bind(c, 10);
|
||||
var f12 = c.foo.bind(c, 10, "hello");
|
||||
var f13 = c.foo.bind(c, 10, 20); // Error
|
||||
var f14 = c.foo.bind(undefined); // Error
|
||||
var c10 = c.foo.call(c, 10, "hello");
|
||||
var c11 = c.foo.call(c, 10); // Error
|
||||
var c12 = c.foo.call(c, 10, 20); // Error
|
||||
var c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
var c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
var a10 = c.foo.apply(c, [10, "hello"]);
|
||||
var a11 = c.foo.apply(c, [10]); // Error
|
||||
var a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
var a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
var a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
var f20 = C.bind(undefined);
|
||||
var f21 = C.bind(undefined, 10);
|
||||
var f22 = C.bind(undefined, 10, "hello");
|
||||
var f23 = C.bind(undefined, 10, 20); // Error
|
||||
C.call(c, 10, "hello");
|
||||
C.call(c, 10); // Error
|
||||
C.call(c, 10, 20); // Error
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
C.apply(c, [10, "hello"]);
|
||||
C.apply(c, [10]); // Error
|
||||
C.apply(c, [10, 20]); // Error
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
@@ -0,0 +1,322 @@
|
||||
=== tests/cases/conformance/functions/strictBindCallApply1.ts ===
|
||||
declare function foo(a: number, b: string): string;
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(strictBindCallApply1.ts, 0, 21))
|
||||
>b : Symbol(b, Decl(strictBindCallApply1.ts, 0, 31))
|
||||
|
||||
let f00 = foo.bind(undefined);
|
||||
>f00 : Symbol(f00, Decl(strictBindCallApply1.ts, 2, 3))
|
||||
>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f01 = foo.bind(undefined, 10);
|
||||
>f01 : Symbol(f01, Decl(strictBindCallApply1.ts, 3, 3))
|
||||
>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f02 = foo.bind(undefined, 10, "hello");
|
||||
>f02 : Symbol(f02, Decl(strictBindCallApply1.ts, 4, 3))
|
||||
>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f03 = foo.bind(undefined, 10, 20); // Error
|
||||
>f03 : Symbol(f03, Decl(strictBindCallApply1.ts, 5, 3))
|
||||
>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
>c00 : Symbol(c00, Decl(strictBindCallApply1.ts, 7, 3))
|
||||
>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
>c01 : Symbol(c01, Decl(strictBindCallApply1.ts, 8, 3))
|
||||
>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
>c02 : Symbol(c02, Decl(strictBindCallApply1.ts, 9, 3))
|
||||
>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
>c03 : Symbol(c03, Decl(strictBindCallApply1.ts, 10, 3))
|
||||
>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let a00 = foo.apply(undefined, [10, "hello"]);
|
||||
>a00 : Symbol(a00, Decl(strictBindCallApply1.ts, 12, 3))
|
||||
>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let a01 = foo.apply(undefined, [10]); // Error
|
||||
>a01 : Symbol(a01, Decl(strictBindCallApply1.ts, 13, 3))
|
||||
>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
>a02 : Symbol(a02, Decl(strictBindCallApply1.ts, 14, 3))
|
||||
>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
>a03 : Symbol(a03, Decl(strictBindCallApply1.ts, 15, 3))
|
||||
>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
|
||||
constructor(a: number, b: string) {}
|
||||
>a : Symbol(a, Decl(strictBindCallApply1.ts, 18, 16))
|
||||
>b : Symbol(b, Decl(strictBindCallApply1.ts, 18, 26))
|
||||
|
||||
foo(this: this, a: number, b: string): string { return "" }
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>this : Symbol(this, Decl(strictBindCallApply1.ts, 19, 8))
|
||||
>a : Symbol(a, Decl(strictBindCallApply1.ts, 19, 19))
|
||||
>b : Symbol(b, Decl(strictBindCallApply1.ts, 19, 30))
|
||||
}
|
||||
|
||||
declare let c: C;
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
|
||||
declare let obj: {};
|
||||
>obj : Symbol(obj, Decl(strictBindCallApply1.ts, 23, 11))
|
||||
|
||||
let f10 = c.foo.bind(c);
|
||||
>f10 : Symbol(f10, Decl(strictBindCallApply1.ts, 25, 3))
|
||||
>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let f11 = c.foo.bind(c, 10);
|
||||
>f11 : Symbol(f11, Decl(strictBindCallApply1.ts, 26, 3))
|
||||
>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let f12 = c.foo.bind(c, 10, "hello");
|
||||
>f12 : Symbol(f12, Decl(strictBindCallApply1.ts, 27, 3))
|
||||
>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let f13 = c.foo.bind(c, 10, 20); // Error
|
||||
>f13 : Symbol(f13, Decl(strictBindCallApply1.ts, 28, 3))
|
||||
>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let f14 = c.foo.bind(undefined); // Error
|
||||
>f14 : Symbol(f14, Decl(strictBindCallApply1.ts, 29, 3))
|
||||
>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
>c10 : Symbol(c10, Decl(strictBindCallApply1.ts, 31, 3))
|
||||
>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
>c11 : Symbol(c11, Decl(strictBindCallApply1.ts, 32, 3))
|
||||
>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
>c12 : Symbol(c12, Decl(strictBindCallApply1.ts, 33, 3))
|
||||
>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
>c13 : Symbol(c13, Decl(strictBindCallApply1.ts, 34, 3))
|
||||
>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
>c14 : Symbol(c14, Decl(strictBindCallApply1.ts, 35, 3))
|
||||
>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let a10 = c.foo.apply(c, [10, "hello"]);
|
||||
>a10 : Symbol(a10, Decl(strictBindCallApply1.ts, 37, 3))
|
||||
>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let a11 = c.foo.apply(c, [10]); // Error
|
||||
>a11 : Symbol(a11, Decl(strictBindCallApply1.ts, 38, 3))
|
||||
>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
>a12 : Symbol(a12, Decl(strictBindCallApply1.ts, 39, 3))
|
||||
>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
>a13 : Symbol(a13, Decl(strictBindCallApply1.ts, 40, 3))
|
||||
>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
let a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
>a14 : Symbol(a14, Decl(strictBindCallApply1.ts, 41, 3))
|
||||
>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40))
|
||||
>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f20 = C.bind(undefined);
|
||||
>f20 : Symbol(f20, Decl(strictBindCallApply1.ts, 43, 3))
|
||||
>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f21 = C.bind(undefined, 10);
|
||||
>f21 : Symbol(f21, Decl(strictBindCallApply1.ts, 44, 3))
|
||||
>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f22 = C.bind(undefined, 10, "hello");
|
||||
>f22 : Symbol(f22, Decl(strictBindCallApply1.ts, 45, 3))
|
||||
>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
let f23 = C.bind(undefined, 10, 20); // Error
|
||||
>f23 : Symbol(f23, Decl(strictBindCallApply1.ts, 46, 3))
|
||||
>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more)
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
C.call(c, 10, "hello");
|
||||
>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.call(c, 10); // Error
|
||||
>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.call(c, 10, 20); // Error
|
||||
>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.apply(c, [10, "hello"]);
|
||||
>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.apply(c, [10]); // Error
|
||||
>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.apply(c, [10, 20]); // Error
|
||||
>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50))
|
||||
>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11))
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
=== tests/cases/conformance/functions/strictBindCallApply1.ts ===
|
||||
declare function foo(a: number, b: string): string;
|
||||
>foo : (a: number, b: string) => string
|
||||
>a : number
|
||||
>b : string
|
||||
|
||||
let f00 = foo.bind(undefined);
|
||||
>f00 : (a: number, b: string) => string
|
||||
>foo.bind(undefined) : (a: number, b: string) => string
|
||||
>foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
|
||||
let f01 = foo.bind(undefined, 10);
|
||||
>f01 : (b: string) => string
|
||||
>foo.bind(undefined, 10) : (b: string) => string
|
||||
>foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
|
||||
let f02 = foo.bind(undefined, 10, "hello");
|
||||
>f02 : () => string
|
||||
>foo.bind(undefined, 10, "hello") : () => string
|
||||
>foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let f03 = foo.bind(undefined, 10, 20); // Error
|
||||
>f03 : any
|
||||
>foo.bind(undefined, 10, 20) : any
|
||||
>foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
>c00 : string
|
||||
>foo.call(undefined, 10, "hello") : string
|
||||
>foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>foo : (a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
>c01 : any
|
||||
>foo.call(undefined, 10) : any
|
||||
>foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>foo : (a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
>c02 : any
|
||||
>foo.call(undefined, 10, 20) : any
|
||||
>foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>foo : (a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
>c03 : any
|
||||
>foo.call(undefined, 10, "hello", 30) : any
|
||||
>foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>foo : (a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
let a00 = foo.apply(undefined, [10, "hello"]);
|
||||
>a00 : string
|
||||
>foo.apply(undefined, [10, "hello"]) : string
|
||||
>foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>undefined : undefined
|
||||
>[10, "hello"] : [number, string]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let a01 = foo.apply(undefined, [10]); // Error
|
||||
>a01 : any
|
||||
>foo.apply(undefined, [10]) : any
|
||||
>foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>undefined : undefined
|
||||
>[10] : number[]
|
||||
>10 : 10
|
||||
|
||||
let a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
>a02 : any
|
||||
>foo.apply(undefined, [10, 20]) : any
|
||||
>foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>undefined : undefined
|
||||
>[10, 20] : number[]
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
>a03 : any
|
||||
>foo.apply(undefined, [10, "hello", 30]) : any
|
||||
>foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>foo : (a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>undefined : undefined
|
||||
>[10, "hello", 30] : (string | number)[]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
constructor(a: number, b: string) {}
|
||||
>a : number
|
||||
>b : string
|
||||
|
||||
foo(this: this, a: number, b: string): string { return "" }
|
||||
>foo : (this: this, a: number, b: string) => string
|
||||
>this : this
|
||||
>a : number
|
||||
>b : string
|
||||
>"" : ""
|
||||
}
|
||||
|
||||
declare let c: C;
|
||||
>c : C
|
||||
|
||||
declare let obj: {};
|
||||
>obj : {}
|
||||
|
||||
let f10 = c.foo.bind(c);
|
||||
>f10 : (a: number, b: string) => string
|
||||
>c.foo.bind(c) : (a: number, b: string) => string
|
||||
>c.foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c : C
|
||||
|
||||
let f11 = c.foo.bind(c, 10);
|
||||
>f11 : (b: string) => string
|
||||
>c.foo.bind(c, 10) : (b: string) => string
|
||||
>c.foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c : C
|
||||
>10 : 10
|
||||
|
||||
let f12 = c.foo.bind(c, 10, "hello");
|
||||
>f12 : () => string
|
||||
>c.foo.bind(c, 10, "hello") : () => string
|
||||
>c.foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c : C
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let f13 = c.foo.bind(c, 10, 20); // Error
|
||||
>f13 : any
|
||||
>c.foo.bind(c, 10, 20) : any
|
||||
>c.foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c : C
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let f14 = c.foo.bind(undefined); // Error
|
||||
>f14 : any
|
||||
>c.foo.bind(undefined) : any
|
||||
>c.foo.bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>bind : { <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; <T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; <T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; <T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; <T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; <T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
>c10 : string
|
||||
>c.foo.call(c, 10, "hello") : string
|
||||
>c.foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c : C
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
>c11 : any
|
||||
>c.foo.call(c, 10) : any
|
||||
>c.foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c : C
|
||||
>10 : 10
|
||||
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
>c12 : any
|
||||
>c.foo.call(c, 10, 20) : any
|
||||
>c.foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c : C
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
>c13 : any
|
||||
>c.foo.call(c, 10, "hello", 30) : any
|
||||
>c.foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c : C
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
let c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
>c14 : any
|
||||
>c.foo.call(undefined, 10, "hello") : any
|
||||
>c.foo.call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>call : <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let a10 = c.foo.apply(c, [10, "hello"]);
|
||||
>a10 : string
|
||||
>c.foo.apply(c, [10, "hello"]) : string
|
||||
>c.foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c : C
|
||||
>[10, "hello"] : [number, string]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let a11 = c.foo.apply(c, [10]); // Error
|
||||
>a11 : any
|
||||
>c.foo.apply(c, [10]) : any
|
||||
>c.foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c : C
|
||||
>[10] : number[]
|
||||
>10 : 10
|
||||
|
||||
let a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
>a12 : any
|
||||
>c.foo.apply(c, [10, 20]) : any
|
||||
>c.foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c : C
|
||||
>[10, 20] : number[]
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
let a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
>a13 : any
|
||||
>c.foo.apply(c, [10, "hello", 30]) : any
|
||||
>c.foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c : C
|
||||
>[10, "hello", 30] : (string | number)[]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
let a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
>a14 : any
|
||||
>c.foo.apply(undefined, [10, "hello"]) : any
|
||||
>c.foo.apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>c.foo : (this: C, a: number, b: string) => string
|
||||
>c : C
|
||||
>foo : (this: C, a: number, b: string) => string
|
||||
>apply : { <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; }
|
||||
>undefined : undefined
|
||||
>[10, "hello"] : (string | number)[]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let f20 = C.bind(undefined);
|
||||
>f20 : new (a: number, b: string) => C
|
||||
>C.bind(undefined) : new (a: number, b: string) => C
|
||||
>C.bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>C : typeof C
|
||||
>bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
|
||||
let f21 = C.bind(undefined, 10);
|
||||
>f21 : new (b: string) => C
|
||||
>C.bind(undefined, 10) : new (b: string) => C
|
||||
>C.bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>C : typeof C
|
||||
>bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
|
||||
let f22 = C.bind(undefined, 10, "hello");
|
||||
>f22 : new () => C
|
||||
>C.bind(undefined, 10, "hello") : new () => C
|
||||
>C.bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>C : typeof C
|
||||
>bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
let f23 = C.bind(undefined, 10, 20); // Error
|
||||
>f23 : any
|
||||
>C.bind(undefined, 10, 20) : any
|
||||
>C.bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>C : typeof C
|
||||
>bind : { <A extends any[], R>(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; <A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; <A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; <A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; <A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; <AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; }
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
C.call(c, 10, "hello");
|
||||
>C.call(c, 10, "hello") : void
|
||||
>C.call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>C : typeof C
|
||||
>call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>c : C
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
C.call(c, 10); // Error
|
||||
>C.call(c, 10) : any
|
||||
>C.call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>C : typeof C
|
||||
>call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>c : C
|
||||
>10 : 10
|
||||
|
||||
C.call(c, 10, 20); // Error
|
||||
>C.call(c, 10, 20) : any
|
||||
>C.call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>C : typeof C
|
||||
>call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>c : C
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
>C.call(c, 10, "hello", 30) : any
|
||||
>C.call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>C : typeof C
|
||||
>call : <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void
|
||||
>c : C
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
C.apply(c, [10, "hello"]);
|
||||
>C.apply(c, [10, "hello"]) : void
|
||||
>C.apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>C : typeof C
|
||||
>apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>c : C
|
||||
>[10, "hello"] : [number, string]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
|
||||
C.apply(c, [10]); // Error
|
||||
>C.apply(c, [10]) : any
|
||||
>C.apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>C : typeof C
|
||||
>apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>c : C
|
||||
>[10] : number[]
|
||||
>10 : 10
|
||||
|
||||
C.apply(c, [10, 20]); // Error
|
||||
>C.apply(c, [10, 20]) : any
|
||||
>C.apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>C : typeof C
|
||||
>apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>c : C
|
||||
>[10, 20] : number[]
|
||||
>10 : 10
|
||||
>20 : 20
|
||||
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
>C.apply(c, [10, "hello", 30]) : any
|
||||
>C.apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>C : typeof C
|
||||
>apply : { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }
|
||||
>c : C
|
||||
>[10, "hello", 30] : (string | number)[]
|
||||
>10 : 10
|
||||
>"hello" : "hello"
|
||||
>30 : 30
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
+1
@@ -25,6 +25,7 @@
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [undefinedAssignableToGenericMappedIntersection.ts]
|
||||
type Errors<T> = { [P in keyof T]: string | undefined } & {all: string | undefined};
|
||||
function foo<T>() {
|
||||
let obj!: Errors<T>
|
||||
let x!: keyof T;
|
||||
obj[x] = undefined;
|
||||
}
|
||||
|
||||
|
||||
//// [undefinedAssignableToGenericMappedIntersection.js]
|
||||
"use strict";
|
||||
function foo() {
|
||||
var obj;
|
||||
var x;
|
||||
obj[x] = undefined;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
=== tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts ===
|
||||
type Errors<T> = { [P in keyof T]: string | undefined } & {all: string | undefined};
|
||||
>Errors : Symbol(Errors, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 12))
|
||||
>P : Symbol(P, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 20))
|
||||
>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 12))
|
||||
>all : Symbol(all, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 59))
|
||||
|
||||
function foo<T>() {
|
||||
>foo : Symbol(foo, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 84))
|
||||
>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13))
|
||||
|
||||
let obj!: Errors<T>
|
||||
>obj : Symbol(obj, Decl(undefinedAssignableToGenericMappedIntersection.ts, 2, 7))
|
||||
>Errors : Symbol(Errors, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13))
|
||||
|
||||
let x!: keyof T;
|
||||
>x : Symbol(x, Decl(undefinedAssignableToGenericMappedIntersection.ts, 3, 7))
|
||||
>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13))
|
||||
|
||||
obj[x] = undefined;
|
||||
>obj : Symbol(obj, Decl(undefinedAssignableToGenericMappedIntersection.ts, 2, 7))
|
||||
>x : Symbol(x, Decl(undefinedAssignableToGenericMappedIntersection.ts, 3, 7))
|
||||
>undefined : Symbol(undefined)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
=== tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts ===
|
||||
type Errors<T> = { [P in keyof T]: string | undefined } & {all: string | undefined};
|
||||
>Errors : Errors<T>
|
||||
>all : string | undefined
|
||||
|
||||
function foo<T>() {
|
||||
>foo : <T>() => void
|
||||
|
||||
let obj!: Errors<T>
|
||||
>obj : Errors<T>
|
||||
|
||||
let x!: keyof T;
|
||||
>x : keyof T
|
||||
|
||||
obj[x] = undefined;
|
||||
>obj[x] = undefined : undefined
|
||||
>obj[x] : Errors<T>[keyof T]
|
||||
>obj : Errors<T>
|
||||
>x : keyof T
|
||||
>undefined : undefined
|
||||
}
|
||||
|
||||
@@ -39,10 +39,15 @@ node_modules/adonis-framework/src/Event/index.js(128,12): error TS2322: Type '()
|
||||
Property 'pop' is missing in type '() => {}[]'.
|
||||
node_modules/adonis-framework/src/Event/index.js(153,25): error TS2339: Property 'wildcard' does not exist on type 'EventEmitter2'.
|
||||
node_modules/adonis-framework/src/Event/index.js(188,17): error TS2304: Cannot find name 'Spread'.
|
||||
node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/adonis-framework/src/Event/index.js(207,24): error TS2304: Cannot find name 'Sring'.
|
||||
node_modules/adonis-framework/src/Event/index.js(256,52): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
|
||||
Type 'Function' provides no match for the signature '(...values: any[]): void'.
|
||||
node_modules/adonis-framework/src/Event/index.js(264,28): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
|
||||
node_modules/adonis-framework/src/Event/index.js(271,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[string, any, TimerHandler]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/adonis-framework/src/Event/index.js(278,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[string, any, TimerHandler]'.
|
||||
node_modules/adonis-framework/src/Event/index.js(294,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(13,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(27,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
@@ -107,6 +112,13 @@ node_modules/adonis-framework/src/Response/index.js(95,16): error TS2304: Cannot
|
||||
node_modules/adonis-framework/src/Response/index.js(172,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Response/index.js(299,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Response/index.js(323,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/ResourceCollection.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/adonis-framework/src/Route/ResourceCollection.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/ResourceMember.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/ResourceMember.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/group.js(34,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/group.js(43,41): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/helpers.js(22,13): error TS2304: Cannot find name 'Any'.
|
||||
node_modules/adonis-framework/src/Route/helpers.js(34,3): error TS2322: Type 'string | string[]' is not assignable to type 'string'.
|
||||
Type 'string[]' is not assignable to type 'string'.
|
||||
@@ -120,6 +132,8 @@ node_modules/adonis-framework/src/Route/index.js(259,21): error TS2345: Argument
|
||||
node_modules/adonis-framework/src/Route/index.js(280,21): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'.
|
||||
node_modules/adonis-framework/src/Route/index.js(321,13): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/index.js(321,20): error TS8029: JSDoc '@param' tag has name 'keys', but there is no parameter with that name. It would match 'arguments' if it had an array type.
|
||||
node_modules/adonis-framework/src/Route/index.js(333,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/index.js(343,33): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/index.js(354,20): error TS2694: Namespace 'Route' has no exported member 'Group'.
|
||||
node_modules/adonis-framework/src/Route/index.js(368,3): error TS2322: Type 'null' is not assignable to type 'string'.
|
||||
node_modules/adonis-framework/src/Route/index.js(396,10): error TS2554: Expected 2 arguments, but got 3.
|
||||
@@ -133,11 +147,16 @@ node_modules/adonis-framework/src/Route/resource.js(96,25): error TS2345: Argume
|
||||
node_modules/adonis-framework/src/Route/resource.js(97,25): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(172,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(172,22): error TS8029: JSDoc '@param' tag has name 'methods', but there is no parameter with that name. It would match 'arguments' if it had an array type.
|
||||
node_modules/adonis-framework/src/Route/resource.js(183,45): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(198,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(198,22): error TS8029: JSDoc '@param' tag has name 'methods', but there is no parameter with that name. It would match 'arguments' if it had an array type.
|
||||
node_modules/adonis-framework/src/Route/resource.js(209,45): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(233,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(261,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(296,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Route/resource.js(314,62): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Server/helpers.js(17,29): error TS8024: JSDoc '@param' tag has name 'appNamespace', but there is no parameter with that name.
|
||||
node_modules/adonis-framework/src/Server/index.js(17,21): error TS2307: Cannot find module 'adonis-fold'.
|
||||
node_modules/adonis-framework/src/Server/index.js(54,21): error TS2554: Expected 4 arguments, but got 3.
|
||||
|
||||
@@ -20,6 +20,10 @@ node_modules/bluebird/js/release/debuggability.js(168,17): error TS2403: Subsequ
|
||||
node_modules/bluebird/js/release/debuggability.js(174,26): error TS2339: Property 'detail' does not exist on type 'Event'.
|
||||
node_modules/bluebird/js/release/debuggability.js(175,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any) | ((o: any, key: any, desc: any) => any)' has no compatible call signatures.
|
||||
node_modules/bluebird/js/release/debuggability.js(176,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType<any>) => any) | ((o: any, key: any, desc: any) => any)' has no compatible call signatures.
|
||||
node_modules/bluebird/js/release/debuggability.js(199,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '["removeListener", string, (...args: any[]) => void]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/bluebird/js/release/debuggability.js(242,56): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/bluebird/js/release/debuggability.js(491,19): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
node_modules/bluebird/js/release/debuggability.js(562,46): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(736,5): error TS2721: Cannot invoke an object which is possibly 'null'.
|
||||
@@ -50,6 +54,7 @@ node_modules/bluebird/js/release/map.js(111,23): error TS2339: Property '_values
|
||||
node_modules/bluebird/js/release/map.js(113,18): error TS2339: Property '_isResolved' does not exist on type 'MappingPromiseArray'.
|
||||
node_modules/bluebird/js/release/map.js(127,10): error TS2339: Property '_resolve' does not exist on type 'MappingPromiseArray'.
|
||||
node_modules/bluebird/js/release/map.js(156,66): error TS2339: Property 'promise' does not exist on type 'MappingPromiseArray'.
|
||||
node_modules/bluebird/js/release/method.js(15,46): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/bluebird/js/release/nodeback.js(21,20): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: {}) => string[]) | ((o: any) => string[])' has no compatible call signatures.
|
||||
node_modules/bluebird/js/release/nodeify.js(32,19): error TS2339: Property 'cause' does not exist on type 'Error'.
|
||||
node_modules/bluebird/js/release/promise.js(4,12): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
|
||||
@@ -11,8 +11,8 @@ Standard output:
|
||||
../../../../built/local/lib.dom.d.ts(11899,13): error TS2300: Duplicate identifier 'Request'.
|
||||
../../../../built/local/lib.dom.d.ts(16316,11): error TS2300: Duplicate identifier 'Window'.
|
||||
../../../../built/local/lib.dom.d.ts(16447,13): error TS2300: Duplicate identifier 'Window'.
|
||||
../../../../built/local/lib.es5.d.ts(1346,11): error TS2300: Duplicate identifier 'ArrayLike'.
|
||||
../../../../built/local/lib.es5.d.ts(1382,6): error TS2300: Duplicate identifier 'Record'.
|
||||
../../../../built/local/lib.es5.d.ts(1406,11): error TS2300: Duplicate identifier 'ArrayLike'.
|
||||
../../../../built/local/lib.es5.d.ts(1442,6): error TS2300: Duplicate identifier 'Record'.
|
||||
../../../../node_modules/@types/node/index.d.ts(150,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{}', but here has type 'NodeModule'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(95,28): error TS2339: Property 'response' does not exist on type 'EventTarget'.
|
||||
|
||||
@@ -41,6 +41,8 @@ node_modules/debug/dist/debug.js(733,74): error TS2339: Property 'process' does
|
||||
node_modules/debug/dist/debug.js(733,112): error TS2339: Property 'process' does not exist on type 'Window'.
|
||||
node_modules/debug/dist/debug.js(744,146): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'?
|
||||
node_modules/debug/dist/debug.js(745,78): error TS2339: Property 'firebug' does not exist on type 'Console'.
|
||||
node_modules/debug/dist/debug.js(799,156): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/debug/dist/debug.js(851,21): error TS2304: Cannot find name 'LocalStorage'.
|
||||
node_modules/debug/src/browser.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable.
|
||||
node_modules/debug/src/browser.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable.
|
||||
@@ -49,6 +51,7 @@ node_modules/debug/src/browser.js(34,66): error TS2339: Property 'process' does
|
||||
node_modules/debug/src/browser.js(34,104): error TS2339: Property 'process' does not exist on type 'Window'.
|
||||
node_modules/debug/src/browser.js(45,138): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'?
|
||||
node_modules/debug/src/browser.js(46,70): error TS2339: Property 'firebug' does not exist on type 'Console'.
|
||||
node_modules/debug/src/browser.js(100,148): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'.
|
||||
node_modules/debug/src/browser.js(152,13): error TS2304: Cannot find name 'LocalStorage'.
|
||||
node_modules/debug/src/common.js(51,24): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: any; default: any; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'.
|
||||
node_modules/debug/src/common.js(51,60): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: any; default: any; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'.
|
||||
@@ -79,6 +82,8 @@ node_modules/debug/src/node.js(56,5): error TS2322: Type 'false' is not assignab
|
||||
node_modules/debug/src/node.js(58,5): error TS2322: Type 'null' is not assignable to type 'string | undefined'.
|
||||
node_modules/debug/src/node.js(60,5): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
|
||||
node_modules/debug/src/node.js(71,108): error TS2339: Property 'fd' does not exist on type 'WriteStream'.
|
||||
node_modules/debug/src/node.js(108,55): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/debug/src/node.js(136,3): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
|
||||
Type 'undefined' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -5,11 +5,18 @@ node_modules/graceful-fs/fs.js(17,38): error TS2345: Argument of type 'PropertyD
|
||||
Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType<any>'.
|
||||
Type 'undefined' is not assignable to type 'PropertyDescriptor'.
|
||||
node_modules/graceful-fs/graceful-fs.js(12,3): error TS2322: Type '(msg: string, ...param: any[]) => void' is not assignable to type '() => void'.
|
||||
node_modules/graceful-fs/graceful-fs.js(15,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/graceful-fs/graceful-fs.js(22,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/graceful-fs/graceful-fs.js(37,1): error TS2322: Type '(fd: any, cb: any) => any' is not assignable to type 'typeof close'.
|
||||
Property '__promisify__' is missing in type '(fd: any, cb: any) => any'.
|
||||
node_modules/graceful-fs/graceful-fs.js(37,1): error TS2322: Type '(fd: any, cb: any) => void' is not assignable to type 'typeof close'.
|
||||
Property '__promisify__' is missing in type '(fd: any, cb: any) => void'.
|
||||
node_modules/graceful-fs/graceful-fs.js(51,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[number]'.
|
||||
Property '0' is missing in type 'IArguments'.
|
||||
node_modules/graceful-fs/graceful-fs.js(161,5): error TS2539: Cannot assign to 'ReadStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(162,5): error TS2539: Cannot assign to 'WriteStream' because it is not a variable.
|
||||
node_modules/graceful-fs/graceful-fs.js(180,68): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/graceful-fs/graceful-fs.js(203,70): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
node_modules/graceful-fs/graceful-fs.js(252,3): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/graceful-fs/graceful-fs.js(259,5): error TS2554: Expected 0 arguments, but got 3.
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@ node_modules/lodash/_baseFlatten.js(19,29): error TS2322: Type '(value: any) =>
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/_baseHas.js(16,56): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'.
|
||||
Type 'any[]' is not assignable to type 'string | number | symbol'.
|
||||
Type 'any[]' is not assignable to type 'symbol'.
|
||||
node_modules/lodash/_baseIntersection.js(53,40): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'.
|
||||
Type 'undefined' is not assignable to type 'Function'.
|
||||
node_modules/lodash/_baseIntersection.js(60,54): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'.
|
||||
@@ -126,6 +129,8 @@ node_modules/lodash/_createWrap.js(96,26): error TS2345: Argument of type 'Timer
|
||||
node_modules/lodash/_createWrap.js(97,100): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/_createWrap.js(98,28): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
node_modules/lodash/_createWrap.js(100,44): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[TimerHandler, number, any?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (number | undefined)?, (number | undefined)?]'.
|
||||
Property '0' is missing in type 'any[]'.
|
||||
node_modules/lodash/_createWrap.js(103,51): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
node_modules/lodash/_customDefaultsMerge.js(22,35): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.
|
||||
@@ -227,6 +232,9 @@ node_modules/lodash/core.js(2183,41): error TS8024: JSDoc '@param' tag has name
|
||||
node_modules/lodash/core.js(2473,21): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2609,39): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2644,12): error TS2554: Expected 3-5 arguments, but got 2.
|
||||
node_modules/lodash/core.js(3245,58): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'.
|
||||
Type 'any[]' is not assignable to type 'string | number | symbol'.
|
||||
Type 'any[]' is not assignable to type 'symbol'.
|
||||
node_modules/lodash/core.js(3354,53): error TS2538: Type 'any[]' cannot be used as an index type.
|
||||
node_modules/lodash/core.js(3424,41): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
|
||||
Type 'Function' provides no match for the signature '(substring: string, ...args: any[]): string'.
|
||||
|
||||
@@ -29,6 +29,8 @@ node_modules/npm/bin/npm-cli.js(128,13): error TS2339: Property 'command' does n
|
||||
node_modules/npm/bin/npm-cli.js(132,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/bin/npm-cli.js(134,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/bin/npm-cli.js(136,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/bin/npm-cli.js(140,32): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/npm/html/static/toc.js(3,40): error TS2531: Object is possibly 'null'.
|
||||
node_modules/npm/lib/access.js(58,46): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/access.js(65,18): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -58,7 +60,10 @@ node_modules/npm/lib/auth/legacy.js(12,30): error TS2339: Property 'config' does
|
||||
node_modules/npm/lib/auth/legacy.js(35,16): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/legacy.js(69,33): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/oauth.js(5,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/oauth.js(6,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, any?, any?]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/npm/lib/auth/saml.js(5,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/saml.js(6,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, any?, any?]'.
|
||||
node_modules/npm/lib/auth/sso.js(7,21): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/sso.js(20,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/auth/sso.js(28,36): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -147,6 +152,8 @@ node_modules/npm/lib/config/core.js(333,10): error TS2339: Property 'emit' does
|
||||
node_modules/npm/lib/config/core.js(409,29): error TS2345: Argument of type '(orig: string, esc: any, name: any) => string | undefined' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
|
||||
Type 'string | undefined' is not assignable to type 'string'.
|
||||
Type 'undefined' is not assignable to type 'string'.
|
||||
node_modules/npm/lib/config/defaults.js(20,52): error TS2345: Argument of type 'never[]' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Property '0' is missing in type 'never[]'.
|
||||
node_modules/npm/lib/config/gentle-fs.js(16,11): error TS2339: Property 'prefix' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/config/gentle-fs.js(17,11): error TS2339: Property 'globalPrefix' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/config/gentle-fs.js(18,11): error TS2339: Property 'dir' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -430,8 +437,8 @@ node_modules/npm/lib/install.js(268,26): error TS2339: Property 'config' does no
|
||||
node_modules/npm/lib/install.js(269,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install.js(272,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install.js(273,7): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/npm/lib/install.js(273,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type 'Function'.
|
||||
Type 'undefined' is not assignable to type 'Function'.
|
||||
node_modules/npm/lib/install.js(273,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type '(this: null, err?: any, ...args: any[]) => any'.
|
||||
Type 'undefined' is not assignable to type '(this: null, err?: any, ...args: any[]) => any'.
|
||||
node_modules/npm/lib/install.js(340,25): error TS2339: Property 'failing' does not exist on type 'Installer'.
|
||||
node_modules/npm/lib/install.js(369,18): error TS2345: Argument of type '"time"' is not assignable to parameter of type 'Signals'.
|
||||
node_modules/npm/lib/install.js(376,16): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type 'Signals'.
|
||||
@@ -837,6 +844,8 @@ node_modules/npm/lib/utils/metrics.js(61,31): error TS2345: Argument of type 'Bu
|
||||
node_modules/npm/lib/utils/metrics.js(62,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/utils/metrics.js(64,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/utils/metrics.js(65,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/utils/output.js(6,30): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/npm/lib/utils/perf.js(9,12): error TS2345: Argument of type '"time"' is not assignable to parameter of type 'Signals'.
|
||||
node_modules/npm/lib/utils/perf.js(10,12): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type 'Signals'.
|
||||
node_modules/npm/lib/utils/read-local-package.js(7,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -909,6 +918,8 @@ node_modules/npm/test/broken-under-nyc-and-travis/whoami.js(7,20): error TS2307:
|
||||
node_modules/npm/test/common-tap.js(5,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'.
|
||||
node_modules/npm/test/common-tap.js(10,3): error TS2322: Type '(...args: any[]) => void' is not assignable to type 'typeof setImmediate'.
|
||||
Property '__promisify__' is missing in type '(...args: any[]) => void'.
|
||||
node_modules/npm/test/common-tap.js(12,28): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[(...args: any[]) => void, number, ...any[]]'.
|
||||
Property '0' is missing in type 'any[]'.
|
||||
node_modules/npm/test/common-tap.js(175,17): error TS2339: Property '_storage' does not exist on type 'Environment'.
|
||||
node_modules/npm/test/common-tap.js(181,31): error TS2339: Property '_storage' does not exist on type 'Environment'.
|
||||
node_modules/npm/test/common-tap.js(192,12): error TS2339: Property '_storage' does not exist on type 'Environment'.
|
||||
@@ -927,6 +938,8 @@ node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(2,20): error TS2307: Ca
|
||||
node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(11,21): error TS2307: Cannot find module 'tacks'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(2,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(12,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(34,42): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(48,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(49,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'.
|
||||
node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(4,20): error TS2307: Cannot find module 'tap'.
|
||||
@@ -936,6 +949,7 @@ node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(2,20): error TS2307:
|
||||
node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(6,21): error TS2307: Cannot find module 'tacks'.
|
||||
node_modules/npm/test/need-npm5-update/lifecycle-signal.js(8,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(3,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(11,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'.
|
||||
node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'.
|
||||
node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(8,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(10,22): error TS2307: Cannot find module '../common-tap.js'.
|
||||
@@ -1436,6 +1450,8 @@ node_modules/npm/test/tap/outdated-json.js(5,18): error TS2307: Cannot find modu
|
||||
node_modules/npm/test/tap/outdated-json.js(8,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/outdated-long.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'.
|
||||
node_modules/npm/test/tap/outdated-long.js(7,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/outdated-long.js(63,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
node_modules/npm/test/tap/outdated-long.js(66,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/test/tap/outdated-long.js(74,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/test/tap/outdated-long.js(76,15): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -1444,6 +1460,7 @@ node_modules/npm/test/tap/outdated.js(5,18): error TS2307: Cannot find module 'n
|
||||
node_modules/npm/test/tap/outdated.js(7,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/outdated.js(92,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/test/tap/outdated.js(100,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/test/tap/outdated.js(103,39): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/npm/test/tap/outdated.js(105,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/test/tap/override-bundled.js(3,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/owner.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'.
|
||||
|
||||
@@ -4,6 +4,8 @@ node_modules/npmlog/log.js(83,12): error TS2551: Property '_pause' does not exis
|
||||
node_modules/npmlog/log.js(149,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'?
|
||||
node_modules/npmlog/log.js(154,13): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'?
|
||||
node_modules/npmlog/log.js(155,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'?
|
||||
node_modules/npmlog/log.js(194,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Property '0' is missing in type 'any[]'.
|
||||
node_modules/npmlog/log.js(218,12): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'?
|
||||
node_modules/npmlog/log.js(271,16): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
|
||||
Type 'undefined' is not assignable to type 'string'.
|
||||
|
||||
@@ -6,6 +6,9 @@ src/cli/util.js(262,64): error TS2339: Property 'length' does not exist on type
|
||||
src/cli/util.js(335,52): error TS2339: Property 'length' does not exist on type 'Ignore'.
|
||||
src/cli/util.js(396,46): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number | undefined'.
|
||||
src/cli/util.js(403,39): error TS2339: Property 'grey' does not exist on type 'typeof import("../../../node_modules/chalk/types/index")'.
|
||||
src/cli/util.js(454,16): error TS2339: Property 'type' does not exist on type 'never'.
|
||||
src/cli/util.js(455,16): error TS2339: Property 'oppositeDescription' does not exist on type 'never'.
|
||||
src/cli/util.js(456,17): error TS2339: Property 'name' does not exist on type 'never'.
|
||||
src/common/parser-create-error.js(8,9): error TS2339: Property 'loc' does not exist on type 'SyntaxError'.
|
||||
src/config/resolve-config.js(75,32): error TS2345: Argument of type '{ sync: false; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'.
|
||||
Property 'cache' is missing in type '{ sync: false; }'.
|
||||
@@ -14,6 +17,8 @@ src/config/resolve-config.js(82,32): error TS2345: Argument of type '{ sync: tru
|
||||
src/doc/doc-printer.js(213,17): error TS2532: Object is possibly 'undefined'.
|
||||
src/doc/doc-printer.js(214,18): error TS2532: Object is possibly 'undefined'.
|
||||
src/doc/doc-printer.js(215,17): error TS2532: Object is possibly 'undefined'.
|
||||
src/doc/doc-printer.js(447,37): error TS2345: Argument of type 'any[][]' is not assignable to parameter of type 'never[]'.
|
||||
Type 'any[]' is not assignable to type 'never'.
|
||||
src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'.
|
||||
src/language-css/parser-postcss.js(78,32): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'.
|
||||
src/language-css/parser-postcss.js(88,30): error TS2345: Argument of type '{ open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'.
|
||||
|
||||
@@ -22,7 +22,11 @@ node_modules/uglify-js/lib/compress.js(1316,38): error TS2554: Expected 0 argume
|
||||
node_modules/uglify-js/lib/compress.js(1411,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1519,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1551,26): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1652,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
Property '0' is missing in type 'number[]'.
|
||||
node_modules/uglify-js/lib/compress.js(1975,44): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(2013,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
Property '0' is missing in type 'any[]'.
|
||||
node_modules/uglify-js/lib/compress.js(2161,19): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3214,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3227,33): error TS2322: Type '"f"' is not assignable to type 'boolean'.
|
||||
@@ -39,6 +43,8 @@ node_modules/uglify-js/lib/compress.js(3988,30): error TS2554: Expected 0 argume
|
||||
node_modules/uglify-js/lib/compress.js(4097,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4396,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(4480,22): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4672,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'.
|
||||
Property '0' is missing in type 'any[]'.
|
||||
node_modules/uglify-js/lib/compress.js(4830,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4837,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'.
|
||||
node_modules/uglify-js/lib/compress.js(4841,36): error TS2532: Object is possibly 'undefined'.
|
||||
@@ -104,6 +110,9 @@ node_modules/uglify-js/lib/sourcemap.js(55,25): error TS2304: Cannot find name '
|
||||
node_modules/uglify-js/lib/sourcemap.js(61,23): error TS2304: Cannot find name 'MOZ_SourceMap'.
|
||||
node_modules/uglify-js/tools/exit.js(7,32): error TS2339: Property 'bufferSize' does not exist on type 'WriteStream'.
|
||||
node_modules/uglify-js/tools/exit.js(7,61): error TS2339: Property 'bufferSize' does not exist on type 'WriteStream'.
|
||||
node_modules/uglify-js/tools/exit.js(10,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[(number | undefined)?]'.
|
||||
Types of property 'length' are incompatible.
|
||||
Type 'number' is not assignable to type '0 | 1'.
|
||||
node_modules/uglify-js/tools/node.js(64,26): error TS2339: Property 'minify' does not exist on type 'typeof import("/uglify-js/node_modules/uglify-js/tools/node")'.
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ node_modules/util/util.js(55,20): error TS2555: Expected at least 2 arguments, b
|
||||
node_modules/util/util.js(73,15): error TS2339: Property 'noDeprecation' does not exist on type 'Process'.
|
||||
node_modules/util/util.js(80,19): error TS2339: Property 'throwDeprecation' does not exist on type 'Process'.
|
||||
node_modules/util/util.js(82,26): error TS2339: Property 'traceDeprecation' does not exist on type 'Process'.
|
||||
node_modules/util/util.js(106,49): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'.
|
||||
node_modules/util/util.js(553,69): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'.
|
||||
Property 'pop' is missing in type 'IArguments'.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// @strict: true
|
||||
type Errors<T> = { [P in keyof T]: string | undefined } & {all: string | undefined};
|
||||
function foo<T>() {
|
||||
let obj!: Errors<T>
|
||||
let x!: keyof T;
|
||||
obj[x] = undefined;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// @strict: true
|
||||
|
||||
declare function foo(a: number, b: string): string;
|
||||
|
||||
let f00 = foo.bind(undefined);
|
||||
let f01 = foo.bind(undefined, 10);
|
||||
let f02 = foo.bind(undefined, 10, "hello");
|
||||
let f03 = foo.bind(undefined, 10, 20); // Error
|
||||
|
||||
let c00 = foo.call(undefined, 10, "hello");
|
||||
let c01 = foo.call(undefined, 10); // Error
|
||||
let c02 = foo.call(undefined, 10, 20); // Error
|
||||
let c03 = foo.call(undefined, 10, "hello", 30); // Error
|
||||
|
||||
let a00 = foo.apply(undefined, [10, "hello"]);
|
||||
let a01 = foo.apply(undefined, [10]); // Error
|
||||
let a02 = foo.apply(undefined, [10, 20]); // Error
|
||||
let a03 = foo.apply(undefined, [10, "hello", 30]); // Error
|
||||
|
||||
class C {
|
||||
constructor(a: number, b: string) {}
|
||||
foo(this: this, a: number, b: string): string { return "" }
|
||||
}
|
||||
|
||||
declare let c: C;
|
||||
declare let obj: {};
|
||||
|
||||
let f10 = c.foo.bind(c);
|
||||
let f11 = c.foo.bind(c, 10);
|
||||
let f12 = c.foo.bind(c, 10, "hello");
|
||||
let f13 = c.foo.bind(c, 10, 20); // Error
|
||||
let f14 = c.foo.bind(undefined); // Error
|
||||
|
||||
let c10 = c.foo.call(c, 10, "hello");
|
||||
let c11 = c.foo.call(c, 10); // Error
|
||||
let c12 = c.foo.call(c, 10, 20); // Error
|
||||
let c13 = c.foo.call(c, 10, "hello", 30); // Error
|
||||
let c14 = c.foo.call(undefined, 10, "hello"); // Error
|
||||
|
||||
let a10 = c.foo.apply(c, [10, "hello"]);
|
||||
let a11 = c.foo.apply(c, [10]); // Error
|
||||
let a12 = c.foo.apply(c, [10, 20]); // Error
|
||||
let a13 = c.foo.apply(c, [10, "hello", 30]); // Error
|
||||
let a14 = c.foo.apply(undefined, [10, "hello"]); // Error
|
||||
|
||||
let f20 = C.bind(undefined);
|
||||
let f21 = C.bind(undefined, 10);
|
||||
let f22 = C.bind(undefined, 10, "hello");
|
||||
let f23 = C.bind(undefined, 10, 20); // Error
|
||||
|
||||
C.call(c, 10, "hello");
|
||||
C.call(c, 10); // Error
|
||||
C.call(c, 10, 20); // Error
|
||||
C.call(c, 10, "hello", 30); // Error
|
||||
|
||||
C.apply(c, [10, "hello"]);
|
||||
C.apply(c, [10]); // Error
|
||||
C.apply(c, [10, 20]); // Error
|
||||
C.apply(c, [10, "hello", 30]); // Error
|
||||
@@ -0,0 +1,13 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @Filename: bug27134.js
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
var foo = { };
|
||||
|
||||
/**
|
||||
* @type {foo}
|
||||
*/
|
||||
var s;
|
||||
@@ -8,7 +8,7 @@
|
||||
//// "version": "1.0.0",
|
||||
//// "types": "index",
|
||||
//// "typesVersions": {
|
||||
//// "3.0": { "*" : ["ts3.0/*"] }
|
||||
//// ">=3.1.0-0": { "*" : ["ts3.1/*"] }
|
||||
//// }
|
||||
//// }
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
// @Filename: node_modules/ext/aaa.d.ts
|
||||
//// export {};
|
||||
|
||||
// @Filename: node_modules/ext/ts3.0/index.d.ts
|
||||
// @Filename: node_modules/ext/ts3.1/index.d.ts
|
||||
//// export {};
|
||||
|
||||
// @Filename: node_modules/ext/ts3.0/zzz.d.ts
|
||||
// @Filename: node_modules/ext/ts3.1/zzz.d.ts
|
||||
//// export {};
|
||||
|
||||
// @Filename: main.ts
|
||||
@@ -31,6 +31,6 @@
|
||||
|
||||
verify.completions({
|
||||
marker: test.markerNames(),
|
||||
exact: ["aaa", "index", "ts3.0", "zzz"],
|
||||
exact: ["aaa", "index", "ts3.1", "zzz"],
|
||||
isNewIdentifierLocation: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user