Home
last modified time | relevance | path

Searched refs:firstStatement (Results 1 – 7 of 7) sorted by relevance

/third_party/typescript/src/services/codefixes/
DreturnValueCorrect.ts85 const firstStatement = first(declaration.body.statements); constant
86 … (isExpressionStatement(firstStatement) && checkFixedAssignableTo(checker, declaration, checker.ge…
90 expression: firstStatement.expression,
91 statement: firstStatement,
92 commentSource: firstStatement.expression
95 … else if (isLabeledStatement(firstStatement) && isExpressionStatement(firstStatement.statement)) {
96 …ObjectLiteralExpression([factory.createPropertyAssignment(firstStatement.label, firstStatement.sta…
97 …nodeType = createObjectTypeFromLabeledExpression(checker, firstStatement.label, firstStatement.sta…
103 statement: firstStatement,
104 commentSource: firstStatement.statement.expression
[all …]
/third_party/typescript/src/services/refactors/
DextractType.ts83 …isJS: boolean; selection: TypeNode; firstStatement: Statement; typeParameters: readonly TypeParame… property
87 …isJS: boolean; selection: TypeNode; firstStatement: Statement; typeParameters: readonly TypeParame… property
104 …const firstStatement = Debug.checkDefined(findAncestor(selection, isStatement), "Should find a sta… constant
105 const typeParameters = collectTypeParameters(checker, selection, firstStatement, file);
109 return { isJS, selection, firstStatement, typeParameters, typeElements };
200 const { firstStatement, selection, typeParameters } = info; constant
208 …changes.insertNodeBefore(file, firstStatement, ignoreSourceNewlines(newTypeNode), /* blankLineBetw…
213 const { firstStatement, selection, typeParameters, typeElements } = info; constant
223 …changes.insertNodeBefore(file, firstStatement, ignoreSourceNewlines(newTypeNode), /* blankLineBetw…
228 const { firstStatement, selection, typeParameters } = info; constant
[all …]
DaddOrRemoveBracesToArrowFunction.ts114 const firstStatement = first(func.body.statements); constant
115 if (isReturnStatement(firstStatement)) {
116 …return { func, addBraces: false, expression: firstStatement.expression, returnStatement: firstStat…
/third_party/typescript/src/compiler/factory/
Dutilities.ts408 const firstStatement = firstOrUndefined(statements); constant
409 return firstStatement !== undefined
410 && isPrologueDirective(firstStatement)
411 && isUseStrictPrologue(firstStatement);
/third_party/typescript/src/services/
DtextChanges.ts580 const firstStatement = firstOrUndefined(ctr.body!.statements); constant
581 if (!firstStatement || !ctr.body!.multiLine) {
585 this.insertNodeBefore(sourceFile, firstStatement, newStatement);
/third_party/typescript/lib/
Dtsc.js24684 var firstStatement = ts.firstOrUndefined(statements);
24685 return firstStatement !== undefined
24686 && ts.isPrologueDirective(firstStatement)
24687 && isUseStrictPrologue(firstStatement);
DtypingsInstaller.js30577 var firstStatement = ts.firstOrUndefined(statements);
30578 return firstStatement !== undefined
30579 && ts.isPrologueDirective(firstStatement)
30580 && isUseStrictPrologue(firstStatement);