Merge branch 'master' into recursiveTypeReferences

# Conflicts:
#	src/compiler/checker.ts
This commit is contained in:
Anders Hejlsberg
2019-09-24 11:52:40 -07:00
21 changed files with 424 additions and 236 deletions
+5 -2
View File
@@ -524,6 +524,9 @@ namespace ts {
},
getApparentType,
getUnionType,
isTypeAssignableTo: (source, target) => {
return isTypeAssignableTo(source, target);
},
createAnonymousType,
createSignature,
createSymbol,
@@ -33378,8 +33381,8 @@ namespace ts {
// Modifiers are never allowed on properties except for 'async' on a method declaration
if (prop.modifiers) {
const modifiers = prop.modifiers;
for (const mod of modifiers) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
for (const mod of prop.modifiers!) { // TODO: GH#19955
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
}
+1
View File
@@ -3315,6 +3315,7 @@ namespace ts {
/* @internal */ getElementTypeOfArrayType(arrayType: Type): Type | undefined;
/* @internal */ createPromiseType(type: Type): Type;
/* @internal */ isTypeAssignableTo(source: Type, target: Type): boolean;
/* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo | undefined, numberIndexInfo: IndexInfo | undefined): Type;
/* @internal */ createSignature(
declaration: SignatureDeclaration,