Skip to content

Commit

Permalink
make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed Apr 5, 2020
1 parent 0a9b34b commit a5f3d15
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9645,7 +9645,8 @@ namespace ts {
}
else {
stringIndexInfo = baseConstructorIndexInfo;
if (symbol.flags & SymbolFlags.Enum && (getDeclaredTypeOfSymbol(symbol).flags & TypeFlags.Enum || some(type.properties, prop => !!(getTypeOfSymbol(prop).flags & TypeFlags.NumberLike))) ) {
if (symbol.flags & SymbolFlags.Enum && (getDeclaredTypeOfSymbol(symbol).flags & TypeFlags.Enum ||
some(type.properties, prop => !!(getTypeOfSymbol(prop).flags & TypeFlags.NumberLike)))) {
numberIndexInfo = enumNumberIndexInfo;
}
}
Expand Down Expand Up @@ -9680,7 +9681,7 @@ namespace ts {
const declaration = getIndexDeclarationOfIndexSymbol(indexSymbol, indexKind);
if (!declaration) return undefined;
return createIndexInfo(declaration.type ? getTypeFromTypeNode(declaration.type) : anyType,
hasModifier(declaration, ModifierFlags.Readonly), declaration);
hasModifier(declaration, ModifierFlags.Readonly), declaration);
}

function resolveReverseMappedTypeMembers(type: ReverseMappedType) {
Expand Down
5 changes: 0 additions & 5 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2824,10 +2824,6 @@ namespace ts {
}

function isIndexSignature(): boolean {
return token() === SyntaxKind.StaticKeyword ? lookAhead(isNonStaticIndexSignature) : isNonStaticIndexSignature()
}

function isNonStaticIndexSignature(): boolean {
return token() === SyntaxKind.OpenBracketToken && lookAhead(isUnambiguouslyIndexSignature);
}

Expand Down Expand Up @@ -2888,7 +2884,6 @@ namespace ts {

function parseIndexSignatureDeclaration(node: IndexSignatureDeclaration): IndexSignatureDeclaration {
node.kind = SyntaxKind.IndexSignature;
node.staticModifier = parseOptionalToken(SyntaxKind.StaticKeyword);
node.parameters = parseBracketedList(ParsingContext.Parameters, parseParameter, SyntaxKind.OpenBracketToken, SyntaxKind.CloseBracketToken);
node.type = parseTypeAnnotation();
parseTypeMemberSemicolon();
Expand Down
1 change: 0 additions & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,6 @@ namespace ts {
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
parent: ObjectTypeDeclaration;
staticModifier?: Token<SyntaxKind.StaticKeyword>;
}

export interface TypeNode extends Node {
Expand Down
1 change: 0 additions & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ declare namespace ts {
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
parent: ObjectTypeDeclaration;
staticModifier?: Token<SyntaxKind.StaticKeyword>;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
Expand Down
1 change: 0 additions & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ declare namespace ts {
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
parent: ObjectTypeDeclaration;
staticModifier?: Token<SyntaxKind.StaticKeyword>;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
Expand Down

0 comments on commit a5f3d15

Please sign in to comment.