Skip to content

Commit 78b8275

Browse files
author
Kanchalai Tanglertsampan
committed
Fix linting error
1 parent 55430c4 commit 78b8275

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="moduleNameResolver.ts"/>
1+
/// <reference path="moduleNameResolver.ts"/>
22
/// <reference path="binder.ts"/>
33

44
/* @internal */
@@ -15809,15 +15809,15 @@ namespace ts {
1580915809
function createPromiseReturnType(func: FunctionLikeDeclaration | CallExpression, promisedType: Type) {
1581015810
const promiseType = createPromiseType(promisedType);
1581115811
if (promiseType === emptyObjectType) {
15812-
error(func, isImportCall(func) ?
15812+
error(func, isImportCall(func) ?
1581315813
Diagnostics.A_dynamic_import_call_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
1581415814
Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
1581515815
return unknownType;
1581615816
}
1581715817
else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) {
1581815818
error(func, isImportCall(func) ?
1581915819
Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
15820-
Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
15820+
Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
1582115821
}
1582215822

1582315823
return promiseType;
@@ -24066,10 +24066,6 @@ namespace ts {
2406624066
return result;
2406724067
}
2406824068

24069-
/**
24070-
*
24071-
* @param node
24072-
*/
2407324069
function checkGrammarImportCallExpression(node: ImportCall): boolean {
2407424070
const arguments = node.arguments;
2407524071
if (arguments.length !== 1) {

src/compiler/transformers/module/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ namespace ts {
558558
createCall(createIdentifier("require"), /*typeArguments*/ undefined, [createArrayLiteral(node.arguments), resolve]))
559559
]);
560560
}
561-
561+
562562
function transformImportCallExpressionCommonJS(node: ImportCall): Expression {
563563
// import("./blah")
564564
// emit as

src/compiler/transformers/module/system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ namespace ts {
14881488
// }
14891489
// };
14901490
// });
1491-
return createCall(
1491+
return createCall(
14921492
createPropertyAccess(
14931493
contextObject,
14941494
createIdentifier("import")

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ namespace ts {
10521052
}
10531053

10541054
export interface ImportExpression extends PrimaryExpression {
1055-
kind: SyntaxKind.ImportKeyword
1055+
kind: SyntaxKind.ImportKeyword;
10561056
}
10571057

10581058
export interface DeleteExpression extends UnaryExpression {

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3906,7 +3906,7 @@ namespace ts {
39063906
|| kind === SyntaxKind.TrueKeyword
39073907
|| kind === SyntaxKind.SuperKeyword
39083908
|| kind === SyntaxKind.NonNullExpression
3909-
|| kind === SyntaxKind.MetaProperty
3909+
|| kind === SyntaxKind.MetaProperty;
39103910
}
39113911

39123912
export function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression {

0 commit comments

Comments
 (0)