Fix linting error

This commit is contained in:
Kanchalai Tanglertsampan
2017-04-04 15:43:56 -07:00
parent 55430c46e6
commit 78b8275ab6
5 changed files with 7 additions and 11 deletions
+3 -7
View File
@@ -1,4 +1,4 @@
/// <reference path="moduleNameResolver.ts"/>
/// <reference path="moduleNameResolver.ts"/>
/// <reference path="binder.ts"/>
/* @internal */
@@ -15809,7 +15809,7 @@ namespace ts {
function createPromiseReturnType(func: FunctionLikeDeclaration | CallExpression, promisedType: Type) {
const promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
error(func, isImportCall(func) ?
error(func, isImportCall(func) ?
Diagnostics.A_dynamic_import_call_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
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);
return unknownType;
@@ -15817,7 +15817,7 @@ namespace ts {
else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) {
error(func, isImportCall(func) ?
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 :
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);
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);
}
return promiseType;
@@ -24066,10 +24066,6 @@ namespace ts {
return result;
}
/**
*
* @param node
*/
function checkGrammarImportCallExpression(node: ImportCall): boolean {
const arguments = node.arguments;
if (arguments.length !== 1) {
+1 -1
View File
@@ -558,7 +558,7 @@ namespace ts {
createCall(createIdentifier("require"), /*typeArguments*/ undefined, [createArrayLiteral(node.arguments), resolve]))
]);
}
function transformImportCallExpressionCommonJS(node: ImportCall): Expression {
// import("./blah")
// emit as
+1 -1
View File
@@ -1488,7 +1488,7 @@ namespace ts {
// }
// };
// });
return createCall(
return createCall(
createPropertyAccess(
contextObject,
createIdentifier("import")
+1 -1
View File
@@ -1052,7 +1052,7 @@ namespace ts {
}
export interface ImportExpression extends PrimaryExpression {
kind: SyntaxKind.ImportKeyword
kind: SyntaxKind.ImportKeyword;
}
export interface DeleteExpression extends UnaryExpression {
+1 -1
View File
@@ -3906,7 +3906,7 @@ namespace ts {
|| kind === SyntaxKind.TrueKeyword
|| kind === SyntaxKind.SuperKeyword
|| kind === SyntaxKind.NonNullExpression
|| kind === SyntaxKind.MetaProperty
|| kind === SyntaxKind.MetaProperty;
}
export function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression {