@angular/compiler-cli
Advanced tools
Comparing version 14.3.0 to 16.2.12
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -10,3 +9,3 @@ import { | ||
constructorParametersDownlevelTransform | ||
} from "./chunk-UZLFREET.js"; | ||
} from "./chunk-EMPTJWPY.js"; | ||
import { | ||
@@ -18,3 +17,2 @@ DEFAULT_ERROR_CODE, | ||
NgtscProgram, | ||
OptimizeFor, | ||
PatchedProgramIncrementalBuildStrategy, | ||
@@ -36,11 +34,17 @@ SOURCE, | ||
untagAllTsFiles | ||
} from "./chunk-Q7TXFDI7.js"; | ||
import "./chunk-I5J5TMUB.js"; | ||
import "./chunk-XDX5RDY5.js"; | ||
} from "./chunk-QRYLMBG3.js"; | ||
import { | ||
OptimizeFor | ||
} from "./chunk-IGDIWPM6.js"; | ||
import "./chunk-UHYH6BYB.js"; | ||
import "./chunk-ZETVX4VH.js"; | ||
import "./chunk-CS2FNZXR.js"; | ||
import { | ||
ActivePerfRecorder, | ||
PerfPhase | ||
} from "./chunk-HJOPJLIM.js"; | ||
import { | ||
ConsoleLogger, | ||
LogLevel | ||
} from "./chunk-E7NQQTT7.js"; | ||
import "./chunk-WAZH2LJQ.js"; | ||
import "./chunk-7YHMCUJT.js"; | ||
} from "./chunk-SBDNBITT.js"; | ||
import { | ||
@@ -66,15 +70,17 @@ LogicalFileSystem, | ||
toRelativeImport | ||
} from "./chunk-TOKOIIBI.js"; | ||
import { | ||
ActivePerfRecorder, | ||
PerfPhase | ||
} from "./chunk-2HPI44CB.js"; | ||
import "./chunk-XYNRD7NE.js"; | ||
} from "./chunk-EC5K6QPP.js"; | ||
import "./chunk-SRFZMXHZ.js"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs | ||
import { Version } from "@angular/compiler"; | ||
var VERSION = new Version("14.3.0"); | ||
var VERSION = new Version("16.2.12"); | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/tsc_plugin.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/tsc_plugin.mjs | ||
var NgTscPlugin = class { | ||
get compiler() { | ||
if (this._compiler === null) { | ||
throw new Error("Lifecycle error: setupCompilation() must be called first."); | ||
} | ||
return this._compiler; | ||
} | ||
constructor(ngOptions) { | ||
@@ -88,8 +94,2 @@ this.ngOptions = ngOptions; | ||
} | ||
get compiler() { | ||
if (this._compiler === null) { | ||
throw new Error("Lifecycle error: setupCompilation() must be called first."); | ||
} | ||
return this._compiler; | ||
} | ||
wrapHost(host, inputFiles, options) { | ||
@@ -119,3 +119,11 @@ this.options = { ...this.ngOptions, ...options }; | ||
if (oldProgram === void 0 || oldState === null) { | ||
ticket = freshCompilationTicket(program, this.options, strategy, programDriver, perfRecorder, false, false); | ||
ticket = freshCompilationTicket( | ||
program, | ||
this.options, | ||
strategy, | ||
programDriver, | ||
perfRecorder, | ||
false, | ||
false | ||
); | ||
} else { | ||
@@ -149,3 +157,3 @@ strategy.toNextBuildStrategy().getIncrementalState(oldProgram); | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/index.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/index.mjs | ||
setFileSystem(new NodeJSFileSystem()); | ||
@@ -152,0 +160,0 @@ export { |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
import { | ||
ConsoleLogger, | ||
LogLevel | ||
} from "../../chunk-E7NQQTT7.js"; | ||
import { | ||
FatalLinkerError, | ||
@@ -16,40 +11,34 @@ FileLinker, | ||
isFatalLinkerError | ||
} from "../../chunk-L2QFSPXM.js"; | ||
import "../../chunk-CYVTLM4Z.js"; | ||
import "../../chunk-WAZH2LJQ.js"; | ||
import "../../chunk-7YHMCUJT.js"; | ||
} from "../../chunk-VZK5UEE7.js"; | ||
import "../../chunk-ZETVX4VH.js"; | ||
import "../../chunk-CS2FNZXR.js"; | ||
import { | ||
ConsoleLogger, | ||
LogLevel | ||
} from "../../chunk-SBDNBITT.js"; | ||
import "../../chunk-GYHDNUIK.js"; | ||
import { | ||
NodeJSFileSystem | ||
} from "../../chunk-TOKOIIBI.js"; | ||
import "../../chunk-XYNRD7NE.js"; | ||
} from "../../chunk-EC5K6QPP.js"; | ||
import "../../chunk-SRFZMXHZ.js"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_core.mjs | ||
import * as _babelNamespace from "@babel/core"; | ||
import _babelDefault from "@babel/core"; | ||
var _a; | ||
var babel = (_a = _babelDefault) != null ? _a : _babelNamespace; | ||
var _typesNamespace = _babelNamespace.types; | ||
if (_babelDefault !== void 0) { | ||
_typesNamespace = _babelDefault.types; | ||
} | ||
var types2 = _typesNamespace; | ||
var NodePath = babel.NodePath; | ||
var transformSync = babel.transformSync; | ||
var parse = babel.parse; | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs | ||
import { types as t4 } from "@babel/core"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.mjs | ||
import { types as t } from "@babel/core"; | ||
var BabelAstFactory = class { | ||
constructor(sourceUrl) { | ||
this.sourceUrl = sourceUrl; | ||
this.createArrayLiteral = types2.arrayExpression; | ||
this.createBlock = types2.blockStatement; | ||
this.createConditional = types2.conditionalExpression; | ||
this.createExpressionStatement = types2.expressionStatement; | ||
this.createIdentifier = types2.identifier; | ||
this.createIfStatement = types2.ifStatement; | ||
this.createNewExpression = types2.newExpression; | ||
this.createParenthesizedExpression = types2.parenthesizedExpression; | ||
this.createReturnStatement = types2.returnStatement; | ||
this.createThrowStatement = types2.throwStatement; | ||
this.createUnaryExpression = types2.unaryExpression; | ||
this.createArrayLiteral = t.arrayExpression; | ||
this.createBlock = t.blockStatement; | ||
this.createConditional = t.conditionalExpression; | ||
this.createExpressionStatement = t.expressionStatement; | ||
this.createIdentifier = t.identifier; | ||
this.createIfStatement = t.ifStatement; | ||
this.createNewExpression = t.newExpression; | ||
this.createParenthesizedExpression = t.parenthesizedExpression; | ||
this.createReturnStatement = t.returnStatement; | ||
this.createThrowStatement = t.throwStatement; | ||
this.createUnaryExpression = t.unaryExpression; | ||
} | ||
@@ -59,3 +48,3 @@ attachComments(statement, leadingComments) { | ||
const comment = leadingComments[i]; | ||
types2.addComment(statement, "leading", comment.toString(), !comment.multiline); | ||
t.addComment(statement, "leading", comment.toString(), !comment.multiline); | ||
} | ||
@@ -65,3 +54,3 @@ } | ||
assert(target, isLExpression, "must be a left hand side expression"); | ||
return types2.assignmentExpression("=", target, value); | ||
return t.assignmentExpression("=", target, value); | ||
} | ||
@@ -73,11 +62,11 @@ createBinaryExpression(leftOperand, operator, rightOperand) { | ||
case "??": | ||
return types2.logicalExpression(operator, leftOperand, rightOperand); | ||
return t.logicalExpression(operator, leftOperand, rightOperand); | ||
default: | ||
return types2.binaryExpression(operator, leftOperand, rightOperand); | ||
return t.binaryExpression(operator, leftOperand, rightOperand); | ||
} | ||
} | ||
createCallExpression(callee, args, pure) { | ||
const call = types2.callExpression(callee, args); | ||
const call = t.callExpression(callee, args); | ||
if (pure) { | ||
types2.addComment(call, "leading", " @__PURE__ ", false); | ||
t.addComment(call, "leading", " @__PURE__ ", false); | ||
} | ||
@@ -87,24 +76,27 @@ return call; | ||
createElementAccess(expression, element) { | ||
return types2.memberExpression(expression, element, true); | ||
return t.memberExpression(expression, element, true); | ||
} | ||
createFunctionDeclaration(functionName, parameters, body) { | ||
assert(body, types2.isBlockStatement, "a block"); | ||
return types2.functionDeclaration(types2.identifier(functionName), parameters.map((param) => types2.identifier(param)), body); | ||
assert(body, t.isBlockStatement, "a block"); | ||
return t.functionDeclaration(t.identifier(functionName), parameters.map((param) => t.identifier(param)), body); | ||
} | ||
createFunctionExpression(functionName, parameters, body) { | ||
assert(body, types2.isBlockStatement, "a block"); | ||
const name = functionName !== null ? types2.identifier(functionName) : null; | ||
return types2.functionExpression(name, parameters.map((param) => types2.identifier(param)), body); | ||
assert(body, t.isBlockStatement, "a block"); | ||
const name = functionName !== null ? t.identifier(functionName) : null; | ||
return t.functionExpression(name, parameters.map((param) => t.identifier(param)), body); | ||
} | ||
createDynamicImport(url) { | ||
return this.createCallExpression(t.import(), [t.stringLiteral(url)], false); | ||
} | ||
createLiteral(value) { | ||
if (typeof value === "string") { | ||
return types2.stringLiteral(value); | ||
return t.stringLiteral(value); | ||
} else if (typeof value === "number") { | ||
return types2.numericLiteral(value); | ||
return t.numericLiteral(value); | ||
} else if (typeof value === "boolean") { | ||
return types2.booleanLiteral(value); | ||
return t.booleanLiteral(value); | ||
} else if (value === void 0) { | ||
return types2.identifier("undefined"); | ||
return t.identifier("undefined"); | ||
} else if (value === null) { | ||
return types2.nullLiteral(); | ||
return t.nullLiteral(); | ||
} else { | ||
@@ -115,19 +107,19 @@ throw new Error(`Invalid literal: ${value} (${typeof value})`); | ||
createObjectLiteral(properties) { | ||
return types2.objectExpression(properties.map((prop) => { | ||
const key = prop.quoted ? types2.stringLiteral(prop.propertyName) : types2.identifier(prop.propertyName); | ||
return types2.objectProperty(key, prop.value); | ||
return t.objectExpression(properties.map((prop) => { | ||
const key = prop.quoted ? t.stringLiteral(prop.propertyName) : t.identifier(prop.propertyName); | ||
return t.objectProperty(key, prop.value); | ||
})); | ||
} | ||
createPropertyAccess(expression, propertyName) { | ||
return types2.memberExpression(expression, types2.identifier(propertyName), false); | ||
return t.memberExpression(expression, t.identifier(propertyName), false); | ||
} | ||
createTaggedTemplate(tag, template) { | ||
const elements = template.elements.map((element, i) => this.setSourceMapRange(types2.templateElement(element, i === template.elements.length - 1), element.range)); | ||
return types2.taggedTemplateExpression(tag, types2.templateLiteral(elements, template.expressions)); | ||
const elements = template.elements.map((element, i) => this.setSourceMapRange(t.templateElement(element, i === template.elements.length - 1), element.range)); | ||
return t.taggedTemplateExpression(tag, t.templateLiteral(elements, template.expressions)); | ||
} | ||
createTypeOfExpression(expression) { | ||
return types2.unaryExpression("typeof", expression); | ||
return t.unaryExpression("typeof", expression); | ||
} | ||
createVariableDeclaration(variableName, initializer, type) { | ||
return types2.variableDeclaration(type, [types2.variableDeclarator(types2.identifier(variableName), initializer)]); | ||
return t.variableDeclaration(type, [t.variableDeclarator(t.identifier(variableName), initializer)]); | ||
} | ||
@@ -155,18 +147,19 @@ setSourceMapRange(node, sourceMapRange) { | ||
function isLExpression(expr) { | ||
return types2.isLVal(expr); | ||
return t.isLVal(expr); | ||
} | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_host.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_host.mjs | ||
import { types as t2 } from "@babel/core"; | ||
var BabelAstHost = class { | ||
constructor() { | ||
this.isStringLiteral = types2.isStringLiteral; | ||
this.isNumericLiteral = types2.isNumericLiteral; | ||
this.isArrayLiteral = types2.isArrayExpression; | ||
this.isObjectLiteral = types2.isObjectExpression; | ||
this.isCallExpression = types2.isCallExpression; | ||
this.isStringLiteral = t2.isStringLiteral; | ||
this.isNumericLiteral = t2.isNumericLiteral; | ||
this.isArrayLiteral = t2.isArrayExpression; | ||
this.isObjectLiteral = t2.isObjectExpression; | ||
this.isCallExpression = t2.isCallExpression; | ||
} | ||
getSymbolName(node) { | ||
if (types2.isIdentifier(node)) { | ||
if (t2.isIdentifier(node)) { | ||
return node.name; | ||
} else if (types2.isMemberExpression(node) && types2.isIdentifier(node.property)) { | ||
} else if (t2.isMemberExpression(node) && t2.isIdentifier(node.property)) { | ||
return node.property.name; | ||
@@ -178,14 +171,14 @@ } else { | ||
parseStringLiteral(str) { | ||
assert(str, types2.isStringLiteral, "a string literal"); | ||
assert(str, t2.isStringLiteral, "a string literal"); | ||
return str.value; | ||
} | ||
parseNumericLiteral(num) { | ||
assert(num, types2.isNumericLiteral, "a numeric literal"); | ||
assert(num, t2.isNumericLiteral, "a numeric literal"); | ||
return num.value; | ||
} | ||
isBooleanLiteral(bool) { | ||
return types2.isBooleanLiteral(bool) || isMinifiedBooleanLiteral(bool); | ||
return t2.isBooleanLiteral(bool) || isMinifiedBooleanLiteral(bool); | ||
} | ||
parseBooleanLiteral(bool) { | ||
if (types2.isBooleanLiteral(bool)) { | ||
if (t2.isBooleanLiteral(bool)) { | ||
return bool.value; | ||
@@ -199,3 +192,3 @@ } else if (isMinifiedBooleanLiteral(bool)) { | ||
parseArrayLiteral(array) { | ||
assert(array, types2.isArrayExpression, "an array literal"); | ||
assert(array, t2.isArrayExpression, "an array literal"); | ||
return array.elements.map((element) => { | ||
@@ -208,9 +201,9 @@ assert(element, isNotEmptyElement, "element in array not to be empty"); | ||
parseObjectLiteral(obj) { | ||
assert(obj, types2.isObjectExpression, "an object literal"); | ||
assert(obj, t2.isObjectExpression, "an object literal"); | ||
const result = /* @__PURE__ */ new Map(); | ||
for (const property of obj.properties) { | ||
assert(property, types2.isObjectProperty, "a property assignment"); | ||
assert(property.value, types2.isExpression, "an expression"); | ||
assert(property, t2.isObjectProperty, "a property assignment"); | ||
assert(property.value, t2.isExpression, "an expression"); | ||
assert(property.key, isObjectExpressionPropertyName, "a property name"); | ||
const key = types2.isIdentifier(property.key) ? property.key.name : property.key.value; | ||
const key = t2.isIdentifier(property.key) ? property.key.name : property.key.value; | ||
result.set(`${key}`, property.value); | ||
@@ -221,7 +214,7 @@ } | ||
isFunctionExpression(node) { | ||
return types2.isFunction(node); | ||
return t2.isFunction(node); | ||
} | ||
parseReturnValue(fn) { | ||
assert(fn, this.isFunctionExpression, "a function"); | ||
if (!types2.isBlockStatement(fn.body)) { | ||
if (!t2.isBlockStatement(fn.body)) { | ||
return fn.body; | ||
@@ -233,3 +226,3 @@ } | ||
const stmt = fn.body.body[0]; | ||
assert(stmt, types2.isReturnStatement, "a function body with a single return statement"); | ||
assert(stmt, t2.isReturnStatement, "a function body with a single return statement"); | ||
if (stmt.argument === null || stmt.argument === void 0) { | ||
@@ -241,11 +234,11 @@ throw new FatalLinkerError(stmt, "Unsupported syntax, expected function to return a value."); | ||
parseCallee(call) { | ||
assert(call, types2.isCallExpression, "a call expression"); | ||
assert(call.callee, types2.isExpression, "an expression"); | ||
assert(call, t2.isCallExpression, "a call expression"); | ||
assert(call.callee, t2.isExpression, "an expression"); | ||
return call.callee; | ||
} | ||
parseArguments(call) { | ||
assert(call, types2.isCallExpression, "a call expression"); | ||
assert(call, t2.isCallExpression, "a call expression"); | ||
return call.arguments.map((arg) => { | ||
assert(arg, isNotSpreadArgument, "argument not to use spread syntax"); | ||
assert(arg, types2.isExpression, "argument to be an expression"); | ||
assert(arg, t2.isExpression, "argument to be an expression"); | ||
return arg; | ||
@@ -270,15 +263,16 @@ }); | ||
function isNotSpreadElement(e) { | ||
return !types2.isSpreadElement(e); | ||
return !t2.isSpreadElement(e); | ||
} | ||
function isObjectExpressionPropertyName(n) { | ||
return types2.isIdentifier(n) || types2.isStringLiteral(n) || types2.isNumericLiteral(n); | ||
return t2.isIdentifier(n) || t2.isStringLiteral(n) || t2.isNumericLiteral(n); | ||
} | ||
function isNotSpreadArgument(arg) { | ||
return !types2.isSpreadElement(arg); | ||
return !t2.isSpreadElement(arg); | ||
} | ||
function isMinifiedBooleanLiteral(node) { | ||
return types2.isUnaryExpression(node) && node.prefix && node.operator === "!" && types2.isNumericLiteral(node.argument) && (node.argument.value === 0 || node.argument.value === 1); | ||
return t2.isUnaryExpression(node) && node.prefix && node.operator === "!" && t2.isNumericLiteral(node.argument) && (node.argument.value === 0 || node.argument.value === 1); | ||
} | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_declaration_scope.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_declaration_scope.mjs | ||
import { types as t3 } from "@babel/core"; | ||
var BabelDeclarationScope = class { | ||
@@ -290,6 +284,6 @@ constructor(declarationScope) { | ||
let bindingExpression = expression; | ||
while (types2.isMemberExpression(bindingExpression)) { | ||
while (t3.isMemberExpression(bindingExpression)) { | ||
bindingExpression = bindingExpression.object; | ||
} | ||
if (!types2.isIdentifier(bindingExpression)) { | ||
if (!t3.isIdentifier(bindingExpression)) { | ||
return null; | ||
@@ -309,3 +303,3 @@ } | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs | ||
function createEs2015LinkerPlugin({ fileSystem, logger, ...options }) { | ||
@@ -317,6 +311,6 @@ let fileLinker = null; | ||
enter(path) { | ||
var _a2, _b; | ||
var _a, _b; | ||
assertNull(fileLinker); | ||
const file = path.hub.file; | ||
const filename = (_a2 = file.opts.filename) != null ? _a2 : file.opts.filenameRelative; | ||
const filename = (_a = file.opts.filename) != null ? _a : file.opts.filenameRelative; | ||
if (!filename) { | ||
@@ -383,7 +377,7 @@ throw new Error("No filename (nor filenameRelative) provided by Babel. This is required for the linking of partially compiled directives and components."); | ||
const callee = call.node.callee; | ||
if (types2.isIdentifier(callee)) { | ||
if (t4.isIdentifier(callee)) { | ||
return callee.name; | ||
} else if (types2.isMemberExpression(callee) && types2.isIdentifier(callee.property)) { | ||
} else if (t4.isMemberExpression(callee) && t4.isIdentifier(callee.property)) { | ||
return callee.property.name; | ||
} else if (types2.isMemberExpression(callee) && types2.isStringLiteral(callee.property)) { | ||
} else if (t4.isMemberExpression(callee) && t4.isStringLiteral(callee.property)) { | ||
return callee.property.value; | ||
@@ -395,3 +389,3 @@ } else { | ||
function isExpressionArray(nodes) { | ||
return nodes.every((node) => types2.isExpression(node)); | ||
return nodes.every((node) => t4.isExpression(node)); | ||
} | ||
@@ -414,3 +408,3 @@ function assertNull(obj) { | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_plugin.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_plugin.mjs | ||
function defaultLinkerPlugin(api, options) { | ||
@@ -425,3 +419,3 @@ api.assertVersion(7); | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/index.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/index.mjs | ||
var babel_default = defaultLinkerPlugin; | ||
@@ -428,0 +422,0 @@ export { |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -14,8 +13,8 @@ import { | ||
needsLinking | ||
} from "../chunk-L2QFSPXM.js"; | ||
import "../chunk-CYVTLM4Z.js"; | ||
import "../chunk-WAZH2LJQ.js"; | ||
import "../chunk-7YHMCUJT.js"; | ||
import "../chunk-TOKOIIBI.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
} from "../chunk-VZK5UEE7.js"; | ||
import "../chunk-ZETVX4VH.js"; | ||
import "../chunk-CS2FNZXR.js"; | ||
import "../chunk-GYHDNUIK.js"; | ||
import "../chunk-EC5K6QPP.js"; | ||
import "../chunk-SRFZMXHZ.js"; | ||
export { | ||
@@ -22,0 +21,0 @@ DEFAULT_LINKER_OPTIONS, |
@@ -0,47 +1,45 @@ | ||
#!/usr/bin/env node | ||
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
import { | ||
mainNgcc | ||
} from "../chunk-2LU77VSE.js"; | ||
import "../chunk-R3C7RFJ4.js"; | ||
import { | ||
clearTsConfigCache | ||
} from "../chunk-5TUGYFIJ.js"; | ||
import "../chunk-Q7TXFDI7.js"; | ||
import "../chunk-I5J5TMUB.js"; | ||
import "../chunk-XDX5RDY5.js"; | ||
import { | ||
ConsoleLogger, | ||
LogLevel | ||
} from "../chunk-E7NQQTT7.js"; | ||
import "../chunk-CYVTLM4Z.js"; | ||
import "../chunk-WAZH2LJQ.js"; | ||
import "../chunk-7YHMCUJT.js"; | ||
import { | ||
NodeJSFileSystem, | ||
setFileSystem | ||
} from "../chunk-TOKOIIBI.js"; | ||
import "../chunk-2HPI44CB.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/index.mjs | ||
import { dirname, join } from "path"; | ||
import { fileURLToPath } from "url"; | ||
function process(options) { | ||
setFileSystem(new NodeJSFileSystem()); | ||
return mainNgcc(options); | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/index.mjs | ||
function stringEncaseCRLFWithFirstIndex(value, prefix, postfix, index) { | ||
let endIndex = 0; | ||
let returnValue = ""; | ||
do { | ||
const gotCR = value[index - 1] === "\r"; | ||
returnValue += value.substring(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; | ||
endIndex = index + 1; | ||
index = value.indexOf("\n", endIndex); | ||
} while (index !== -1); | ||
returnValue += value.substring(endIndex); | ||
return returnValue; | ||
} | ||
var containingDirPath = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(__ESM_IMPORT_META_URL__)); | ||
var ngccMainFilePath = join(containingDirPath, "./main-ngcc.js"); | ||
export { | ||
ConsoleLogger, | ||
LogLevel, | ||
clearTsConfigCache, | ||
containingDirPath, | ||
ngccMainFilePath, | ||
process | ||
}; | ||
function styleMessage(message) { | ||
const open = "\x1B[31m\x1B[1m"; | ||
const close = "\x1B[22m\x1B[39m"; | ||
let styledMessage = message; | ||
const lfIndex = styledMessage.indexOf("\n"); | ||
if (lfIndex !== -1) { | ||
styledMessage = stringEncaseCRLFWithFirstIndex(styledMessage, close, open, lfIndex); | ||
} | ||
return open + styledMessage + close; | ||
} | ||
var warningMsg = ` | ||
========================================== | ||
ALERT: As of Angular 16, "ngcc" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the "ngcc" command directly. This "ngcc" invocation can be safely removed. | ||
A common reason for this is invoking "ngcc" from a "postinstall" hook in package.json. | ||
In Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions. | ||
========================================== | ||
`; | ||
console.warn(styleMessage(warningMsg)); | ||
process.exit(0); | ||
/** | ||
@@ -48,0 +46,0 @@ * @license |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
import { | ||
PerfPhase | ||
} from "../chunk-2HPI44CB.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
} from "../chunk-HJOPJLIM.js"; | ||
import "../chunk-SRFZMXHZ.js"; | ||
export { | ||
@@ -11,0 +10,0 @@ PerfPhase |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -9,7 +8,7 @@ import { | ||
LogLevel | ||
} from "../chunk-E7NQQTT7.js"; | ||
} from "../chunk-SBDNBITT.js"; | ||
import { | ||
SourceFile, | ||
SourceFileLoader | ||
} from "../chunk-CYVTLM4Z.js"; | ||
} from "../chunk-GYHDNUIK.js"; | ||
import { | ||
@@ -35,4 +34,4 @@ LogicalFileSystem, | ||
toRelativeImport | ||
} from "../chunk-TOKOIIBI.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
} from "../chunk-EC5K6QPP.js"; | ||
import "../chunk-SRFZMXHZ.js"; | ||
export { | ||
@@ -39,0 +38,0 @@ ConsoleLogger, |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -9,19 +8,22 @@ import { | ||
PartialEvaluator, | ||
PotentialImportKind, | ||
PotentialImportMode, | ||
StaticInterpreter, | ||
forwardRefResolver | ||
} from "../chunk-I5J5TMUB.js"; | ||
} from "../chunk-IGDIWPM6.js"; | ||
import "../chunk-UHYH6BYB.js"; | ||
import "../chunk-ZETVX4VH.js"; | ||
import { | ||
Reference, | ||
TypeScriptReflectionHost, | ||
reflectObjectLiteral | ||
} from "../chunk-XDX5RDY5.js"; | ||
import { | ||
Reference | ||
} from "../chunk-WAZH2LJQ.js"; | ||
import "../chunk-7YHMCUJT.js"; | ||
import "../chunk-TOKOIIBI.js"; | ||
import "../chunk-2HPI44CB.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
} from "../chunk-CS2FNZXR.js"; | ||
import "../chunk-HJOPJLIM.js"; | ||
import "../chunk-EC5K6QPP.js"; | ||
import "../chunk-SRFZMXHZ.js"; | ||
export { | ||
DynamicValue, | ||
PartialEvaluator, | ||
PotentialImportKind, | ||
PotentialImportMode, | ||
Reference, | ||
@@ -28,0 +30,0 @@ StaticInterpreter, |
import {createRequire as __cjsCompatRequire} from 'module'; | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -10,6 +9,7 @@ import { | ||
constructorParametersDownlevelTransform | ||
} from "../chunk-UZLFREET.js"; | ||
import "../chunk-XDX5RDY5.js"; | ||
import "../chunk-7YHMCUJT.js"; | ||
import "../chunk-XYNRD7NE.js"; | ||
} from "../chunk-EMPTJWPY.js"; | ||
import "../chunk-UHYH6BYB.js"; | ||
import "../chunk-CS2FNZXR.js"; | ||
import "../chunk-EC5K6QPP.js"; | ||
import "../chunk-SRFZMXHZ.js"; | ||
export { | ||
@@ -16,0 +16,0 @@ GLOBAL_DEFS_FOR_TERSER, |
@@ -5,3 +5,2 @@ #!/usr/bin/env node | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
@@ -11,21 +10,21 @@ import { | ||
readCommandLineAndConfiguration | ||
} from "../../chunk-V45KD7YD.js"; | ||
} from "../../chunk-VPMZW5GS.js"; | ||
import { | ||
EmitFlags | ||
} from "../../chunk-Q7TXFDI7.js"; | ||
import "../../chunk-I5J5TMUB.js"; | ||
import "../../chunk-XDX5RDY5.js"; | ||
import "../../chunk-WAZH2LJQ.js"; | ||
import "../../chunk-7YHMCUJT.js"; | ||
} from "../../chunk-QRYLMBG3.js"; | ||
import "../../chunk-IGDIWPM6.js"; | ||
import "../../chunk-UHYH6BYB.js"; | ||
import "../../chunk-ZETVX4VH.js"; | ||
import "../../chunk-CS2FNZXR.js"; | ||
import "../../chunk-HJOPJLIM.js"; | ||
import { | ||
NodeJSFileSystem, | ||
setFileSystem | ||
} from "../../chunk-TOKOIIBI.js"; | ||
import "../../chunk-2HPI44CB.js"; | ||
import "../../chunk-XYNRD7NE.js"; | ||
} from "../../chunk-EC5K6QPP.js"; | ||
import "../../chunk-SRFZMXHZ.js"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs | ||
import "reflect-metadata"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/extract_i18n.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/extract_i18n.mjs | ||
import yargs from "yargs"; | ||
@@ -53,3 +52,3 @@ function mainXi18n(args2, consoleError = console.error) { | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs | ||
process.title = "Angular i18n Message Extractor (ng-xi18n)"; | ||
@@ -56,0 +55,0 @@ var args = process.argv.slice(2); |
@@ -5,23 +5,22 @@ #!/usr/bin/env node | ||
const require = __cjsCompatRequire(import.meta.url); | ||
const __ESM_IMPORT_META_URL__ = import.meta.url; | ||
import { | ||
main | ||
} from "../../chunk-V45KD7YD.js"; | ||
import "../../chunk-Q7TXFDI7.js"; | ||
import "../../chunk-I5J5TMUB.js"; | ||
import "../../chunk-XDX5RDY5.js"; | ||
import "../../chunk-WAZH2LJQ.js"; | ||
import "../../chunk-7YHMCUJT.js"; | ||
} from "../../chunk-VPMZW5GS.js"; | ||
import "../../chunk-QRYLMBG3.js"; | ||
import "../../chunk-IGDIWPM6.js"; | ||
import "../../chunk-UHYH6BYB.js"; | ||
import "../../chunk-ZETVX4VH.js"; | ||
import "../../chunk-CS2FNZXR.js"; | ||
import "../../chunk-HJOPJLIM.js"; | ||
import { | ||
NodeJSFileSystem, | ||
setFileSystem | ||
} from "../../chunk-TOKOIIBI.js"; | ||
import "../../chunk-2HPI44CB.js"; | ||
} from "../../chunk-EC5K6QPP.js"; | ||
import { | ||
__require, | ||
__toESM | ||
} from "../../chunk-XYNRD7NE.js"; | ||
} from "../../chunk-SRFZMXHZ.js"; | ||
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ngc.mjs | ||
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ngc.mjs | ||
import "reflect-metadata"; | ||
@@ -28,0 +27,0 @@ async function runNgcComamnd() { |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli" /> | ||
export { VERSION } from './src/version'; | ||
@@ -10,3 +9,3 @@ export * from './src/transformers/api'; | ||
export * from './src/ngtsc/file_system'; | ||
export { NgTscPlugin } from './src/ngtsc/tsc_plugin'; | ||
export { NgTscPlugin, PluginCompilerHost } from './src/ngtsc/tsc_plugin'; | ||
export { NgtscProgram } from './src/ngtsc/program'; | ||
@@ -13,0 +12,0 @@ export { OptimizeFor } from './src/ngtsc/typecheck/api'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,4 +0,10 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/ast/babel_ast_factory" /> | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { types as t } from '@babel/core'; | ||
import { AstFactory, BinaryOperator, LeadingComment, ObjectLiteralProperty, SourceMapRange, TemplateLiteral, VariableDeclarationType } from '../../../../src/ngtsc/translator'; | ||
import { types as t } from '../babel_core'; | ||
/** | ||
@@ -26,2 +32,3 @@ * A Babel flavored implementation of the AstFactory. | ||
createIfStatement: typeof t.ifStatement; | ||
createDynamicImport(url: string): t.Expression; | ||
createLiteral(value: string | number | boolean | null | undefined): t.Expression; | ||
@@ -28,0 +35,0 @@ createNewExpression: typeof t.newExpression; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/ast/babel_ast_host" /> | ||
import { types as t } from '@babel/core'; | ||
import { AstHost, Range } from '../../../../linker'; | ||
import { types as t } from '../babel_core'; | ||
/** | ||
@@ -13,0 +12,0 @@ * This implementation of `AstHost` is able to get information from Babel AST nodes. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/babel_declaration_scope" /> | ||
/** | ||
@@ -9,6 +8,6 @@ * @license | ||
*/ | ||
import { types as t } from '@babel/core'; | ||
import { NodePath, Scope } from '@babel/traverse'; | ||
import { DeclarationScope } from '../../../linker'; | ||
import { types as t } from './babel_core'; | ||
export declare type ConstantScopePath = NodePath<t.FunctionDeclaration> | NodePath<t.FunctionExpression> | NodePath<t.Program>; | ||
export type ConstantScopePath = NodePath<t.FunctionDeclaration> | NodePath<t.FunctionExpression> | NodePath<t.Program>; | ||
/** | ||
@@ -15,0 +14,0 @@ * This class represents the lexical scope of a partial declaration in Babel source code. |
@@ -1,4 +0,10 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/babel_plugin" /> | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
import { ConfigAPI, PluginObj } from '@babel/core'; | ||
import { LinkerOptions } from '../../src/file_linker/linker_options'; | ||
import { ConfigAPI, PluginObj } from './babel_core'; | ||
/** | ||
@@ -5,0 +11,0 @@ * This is the Babel plugin definition that is provided as a default export from the package, such |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/es2015_linker_plugin" /> | ||
import { PluginObj } from './babel_core'; | ||
import { PluginObj } from '@babel/core'; | ||
import { LinkerPluginOptions } from './linker_plugin_options'; | ||
@@ -12,0 +11,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/babel/src/linker_plugin_options" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/ast/ast_host" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * An abstraction for getting information from an AST while being agnostic to the underlying AST |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/ast/ast_value" /> | ||
/** | ||
@@ -14,11 +13,11 @@ * @license | ||
*/ | ||
declare type ObjectType<T> = Extract<T, object>; | ||
type ObjectType<T> = Extract<T, object>; | ||
/** | ||
* Represents the value type of an object literal. | ||
*/ | ||
declare type ObjectValueType<T> = T extends Record<string, infer R> ? R : never; | ||
type ObjectValueType<T> = T extends Record<string, infer R> ? R : never; | ||
/** | ||
* Represents the value type of an array literal. | ||
*/ | ||
declare type ArrayValueType<T> = T extends Array<infer R> ? R : never; | ||
type ArrayValueType<T> = T extends Array<infer R> ? R : never; | ||
/** | ||
@@ -28,12 +27,7 @@ * Ensures that `This` has its generic type `Actual` conform to the expected generic type in | ||
*/ | ||
declare type ConformsTo<This, Actual, Expected> = Actual extends Expected ? This : never; | ||
type ConformsTo<This, Actual, Expected> = Actual extends Expected ? This : never; | ||
/** | ||
* Ensures that `This` is an `AstValue` whose generic type conforms to `Expected`, to disallow | ||
* calling a method if the value's type does not conform. | ||
*/ | ||
declare type HasValueType<This, Expected> = This extends AstValue<infer Actual, any> ? ConformsTo<This, Actual, Expected> : never; | ||
/** | ||
* Represents only the string keys of type `T`. | ||
*/ | ||
declare type PropertyKey<T> = keyof T & string; | ||
type PropertyKey<T> = keyof T & string; | ||
/** | ||
@@ -118,3 +112,3 @@ * This helper class wraps an object expression along with an `AstHost` object, exposing helper | ||
*/ | ||
toLiteral<V>(mapper: (value: AstValue<ObjectValueType<T>, TExpression>) => V): Record<string, V>; | ||
toLiteral<V>(mapper: (value: AstValue<ObjectValueType<T>, TExpression>, key: string) => V): Record<string, V>; | ||
/** | ||
@@ -151,3 +145,3 @@ * Converts the AstObject to a JavaScript Map, mapping each property value (as an | ||
*/ | ||
getNumber(this: HasValueType<this, number>): number; | ||
getNumber(this: ConformsTo<this, T, number>): number; | ||
/** | ||
@@ -160,3 +154,3 @@ * Is this value a string? | ||
*/ | ||
getString(this: HasValueType<this, string>): string; | ||
getString(this: ConformsTo<this, T, string>): string; | ||
/** | ||
@@ -169,3 +163,3 @@ * Is this value a boolean? | ||
*/ | ||
getBoolean(this: HasValueType<this, boolean>): boolean; | ||
getBoolean(this: ConformsTo<this, T, boolean>): boolean; | ||
/** | ||
@@ -178,3 +172,3 @@ * Is this value an object literal? | ||
*/ | ||
getObject(this: HasValueType<this, object>): AstObject<ObjectType<T>, TExpression>; | ||
getObject(this: ConformsTo<this, T, object>): AstObject<ObjectType<T>, TExpression>; | ||
/** | ||
@@ -187,3 +181,3 @@ * Is this value an array literal? | ||
*/ | ||
getArray(this: HasValueType<this, unknown[]>): AstValue<ArrayValueType<T>, TExpression>[]; | ||
getArray(this: ConformsTo<this, T, unknown[]>): AstValue<ArrayValueType<T>, TExpression>[]; | ||
/** | ||
@@ -197,3 +191,3 @@ * Is this value a function expression? | ||
*/ | ||
getFunctionReturnValue<R>(this: HasValueType<this, Function>): AstValue<R, TExpression>; | ||
getFunctionReturnValue<R>(this: ConformsTo<this, T, Function>): AstValue<R, TExpression>; | ||
isCallExpression(): boolean; | ||
@@ -200,0 +194,0 @@ getCallee(): AstValue<unknown, TExpression>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/ast/typescript/typescript_ast_host" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AstHost, Range } from '../ast_host'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/ast/utils" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * Assert that the given `node` is of the type guarded by the `predicate` function. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/fatal_linker_error" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * An unrecoverable error during linking. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/declaration_scope" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * This interface represents the lexical scope of a partial declaration in the source code. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/emit_scopes/emit_scope" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/emit_scopes/local_emit_scope" /> | ||
import { LinkedDefinition } from '../partial_linkers/partial_linker'; | ||
@@ -11,0 +10,0 @@ import { EmitScope } from './emit_scope'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/file_linker" /> | ||
import { AbsoluteFsPath } from '../../../src/ngtsc/file_system'; | ||
@@ -3,0 +2,0 @@ import { DeclarationScope } from './declaration_scope'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/get_source_file" /> | ||
import { AbsoluteFsPath } from '../../../src/ngtsc/file_system'; | ||
@@ -15,3 +14,3 @@ import { SourceFile, SourceFileLoader } from '../../../src/ngtsc/sourcemaps'; | ||
*/ | ||
export declare type GetSourceFileFn = () => SourceFile | null; | ||
export type GetSourceFileFn = () => SourceFile | null; | ||
/** | ||
@@ -18,0 +17,0 @@ * Create a `GetSourceFileFn` that will return the `SourceFile` being linked or `null`, if not |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/linker_environment" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/linker_options" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Options to configure the linking behavior. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/needs_linking" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Determines if the provided source file may need to be processed by the linker, i.e. whether it |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_component_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_directive_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_factory_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_injectable_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_injector_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker_selector" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_linker" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/partial_pipe_linker_1" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/partial_linkers/util" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/file_linker/translator" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/linker/src/linker_import_generator" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
/** | ||
@@ -8,15 +9,4 @@ * @license | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/ngcc" /> | ||
import { AsyncNgccOptions, SyncNgccOptions } from './src/ngcc_options'; | ||
export { ConsoleLogger, Logger, LogLevel } from '../src/ngtsc/logging'; | ||
export { AsyncNgccOptions, clearTsConfigCache, NgccOptions, SyncNgccOptions } from './src/ngcc_options'; | ||
export { PathMappings } from './src/path_mappings'; | ||
export declare function process<T extends AsyncNgccOptions | SyncNgccOptions>(options: T): T extends AsyncNgccOptions ? Promise<void> : void; | ||
export declare const containingDirPath: string; | ||
/** | ||
* Absolute file path that points to the `ngcc` command line entry-point. | ||
* | ||
* This can be used by the Angular CLI to spawn a process running ngcc using | ||
* command line options. | ||
*/ | ||
export declare const ngccMainFilePath: string; | ||
declare function stringEncaseCRLFWithFirstIndex(value: string, prefix: string, postfix: string, index: number): string; | ||
declare function styleMessage(message: string): string; | ||
declare const warningMsg = "\n\n==========================================\n\nALERT: As of Angular 16, \"ngcc\" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the \"ngcc\" command directly. This \"ngcc\" invocation can be safely removed.\n\nA common reason for this is invoking \"ngcc\" from a \"postinstall\" hook in package.json.\n\nIn Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions.\n\n==========================================\n\n"; |
{ | ||
"name": "@angular/compiler-cli", | ||
"version": "14.3.0", | ||
"version": "16.2.12", | ||
"description": "Angular - the compiler CLI for Node.js", | ||
"typings": "index.d.ts", | ||
"bin": { | ||
"ngcc": "./bundles/ngcc/main-ngcc.js", | ||
"ngcc": "./bundles/ngcc/index.js", | ||
"ngc": "./bundles/src/bin/ngc.js", | ||
@@ -20,6 +20,2 @@ "ng-xi18n": "./bundles/src/bin/ng_xi18n.js" | ||
}, | ||
"./ngcc": { | ||
"types": "./ngcc/index.d.ts", | ||
"default": "./bundles/ngcc/index.js" | ||
}, | ||
"./linker": { | ||
@@ -48,19 +44,11 @@ "types": "./linker/index.d.ts", | ||
"default": "./bundles/private/tooling.js" | ||
}, | ||
"./ngcc/src/execution/cluster/ngcc_cluster_worker": { | ||
"default": "./bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js" | ||
}, | ||
"./ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker": { | ||
"default": "./bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js" | ||
} | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.17.2", | ||
"@babel/core": "7.23.2", | ||
"@jridgewell/sourcemap-codec": "^1.4.14", | ||
"reflect-metadata": "^0.1.2", | ||
"chokidar": "^3.0.0", | ||
"convert-source-map": "^1.5.1", | ||
"dependency-graph": "^0.11.0", | ||
"magic-string": "^0.26.0", | ||
"semver": "^7.0.0", | ||
"sourcemap-codec": "^1.4.8", | ||
"tslib": "^2.3.0", | ||
@@ -70,4 +58,4 @@ "yargs": "^17.2.1" | ||
"peerDependencies": { | ||
"@angular/compiler": "14.3.0", | ||
"typescript": ">=4.6.2 <4.9" | ||
"@angular/compiler": "16.2.12", | ||
"typescript": ">=4.9.3 <5.2" | ||
}, | ||
@@ -85,3 +73,3 @@ "repository": { | ||
"engines": { | ||
"node": "^14.15.0 || >=16.10.0" | ||
"node": "^16.14.0 || >=18.10.0" | ||
}, | ||
@@ -88,0 +76,0 @@ "bugs": { |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/private/bazel" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * @fileoverview The API from compiler-cli that the `@angular/bazel` |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/private/localize" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * @fileoverview The API from compiler-cli that the `@angular/localize` |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/private/migrations" /> | ||
/** | ||
@@ -18,1 +17,2 @@ * @fileoverview The API from compiler-cli that the `@angular/core` | ||
export { reflectObjectLiteral, TypeScriptReflectionHost } from '../src/ngtsc/reflection'; | ||
export { PotentialImport, PotentialImportKind, PotentialImportMode, TemplateTypeChecker } from '../src/ngtsc/typecheck/api'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/private/tooling" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * @fileoverview |
@@ -9,3 +9,2 @@ #!/usr/bin/env node | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/bin/ng_xi18n" /> | ||
import 'reflect-metadata'; |
@@ -9,3 +9,2 @@ #!/usr/bin/env node | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/bin/ngc" /> | ||
import 'reflect-metadata'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/extract_i18n" /> | ||
export declare function mainXi18n(args: string[], consoleError?: (msg: string) => void): number; |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/main" /> | ||
import ts from 'typescript'; | ||
import { ParsedConfiguration } from './perform_compile'; | ||
import * as api from './transformers/api'; | ||
declare type TsickleModule = typeof import('tsickle'); | ||
type TsickleModule = typeof import('tsickle'); | ||
export declare function main(args: string[], consoleError?: (s: string) => void, config?: NgcParsedConfiguration, customTransformers?: api.CustomTransformers, programReuse?: { | ||
@@ -15,0 +14,0 @@ program: api.Program | undefined; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common" /> | ||
export * from './src/api'; | ||
@@ -15,2 +14,3 @@ export * from './src/di'; | ||
export * from './src/factory'; | ||
export * from './src/injectable_registry'; | ||
export * from './src/metadata'; | ||
@@ -20,1 +20,2 @@ export * from './src/references_registry'; | ||
export * from './src/util'; | ||
export * from './src/input_transforms'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/api" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Resolves and loads resource files that are referenced in Angular metadata. |
@@ -8,6 +8,5 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/di" /> | ||
import { R3DependencyMetadata } from '@angular/compiler'; | ||
import { ClassDeclaration, CtorParameter, ReflectionHost, UnavailableValue } from '../../../reflection'; | ||
export declare type ConstructorDeps = { | ||
export type ConstructorDeps = { | ||
deps: R3DependencyMetadata[]; | ||
@@ -14,0 +13,0 @@ } | { |
@@ -8,10 +8,10 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/diagnostics" /> | ||
import ts from 'typescript'; | ||
import { FatalDiagnosticError } from '../../../diagnostics'; | ||
import { Reference } from '../../../imports'; | ||
import { InjectableClassRegistry, MetadataReader } from '../../../metadata'; | ||
import { HostDirectiveMeta, MetadataReader } from '../../../metadata'; | ||
import { PartialEvaluator, ResolvedValue } from '../../../partial_evaluator'; | ||
import { ClassDeclaration, ReflectionHost } from '../../../reflection'; | ||
import { DeclarationData, LocalModuleScopeRegistry } from '../../../scope'; | ||
import { InjectableClassRegistry } from './injectable_registry'; | ||
/** | ||
@@ -43,4 +43,12 @@ * Create a `ts.Diagnostic` which indicates the given class is part of the declarations of two or | ||
export declare function getProviderDiagnostics(providerClasses: Set<Reference<ClassDeclaration>>, providersDeclaration: ts.Expression, registry: InjectableClassRegistry): ts.Diagnostic[]; | ||
export declare function getDirectiveDiagnostics(node: ClassDeclaration, reader: MetadataReader, evaluator: PartialEvaluator, reflector: ReflectionHost, scopeRegistry: LocalModuleScopeRegistry, kind: string): ts.Diagnostic[] | null; | ||
export declare function getDirectiveDiagnostics(node: ClassDeclaration, injectableRegistry: InjectableClassRegistry, evaluator: PartialEvaluator, reflector: ReflectionHost, scopeRegistry: LocalModuleScopeRegistry, strictInjectionParameters: boolean, kind: 'Directive' | 'Component'): ts.Diagnostic[] | null; | ||
export declare function validateHostDirectives(origin: ts.Expression, hostDirectives: HostDirectiveMeta[], metaReader: MetadataReader): ts.DiagnosticWithLocation[]; | ||
export declare function getUndecoratedClassWithAngularFeaturesDiagnostic(node: ClassDeclaration): ts.Diagnostic; | ||
export declare function checkInheritanceOfDirective(node: ClassDeclaration, reader: MetadataReader, reflector: ReflectionHost, evaluator: PartialEvaluator): ts.Diagnostic | null; | ||
export declare function checkInheritanceOfInjectable(node: ClassDeclaration, injectableRegistry: InjectableClassRegistry, reflector: ReflectionHost, evaluator: PartialEvaluator, strictInjectionParameters: boolean, kind: 'Directive' | 'Component' | 'Pipe' | 'Injectable'): ts.Diagnostic | null; | ||
interface ClassWithCtor { | ||
ref: Reference<ClassDeclaration>; | ||
isCtorValid: boolean; | ||
isDecorated: boolean; | ||
} | ||
export declare function findInheritedCtor(node: ClassDeclaration, injectableRegistry: InjectableClassRegistry, reflector: ReflectionHost, evaluator: PartialEvaluator): ClassWithCtor | null; | ||
export {}; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/evaluation" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../../imports'; |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/factory" /> | ||
import { R3FactoryMetadata } from '@angular/compiler'; | ||
import { CompileResult } from '../../../transform'; | ||
export declare type CompileFactoryFn = (metadata: R3FactoryMetadata) => CompileResult; | ||
export type CompileFactoryFn = (metadata: R3FactoryMetadata) => CompileResult; | ||
export declare function compileNgFactoryDefField(metadata: R3FactoryMetadata): CompileResult; | ||
export declare function compileDeclareFactory(metadata: R3FactoryMetadata): CompileResult; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/metadata" /> | ||
import { R3ClassMetadata } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import { DeclarationNode, Decorator, ReflectionHost } from '../../../reflection'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/references_registry" /> | ||
import { Reference } from '../../../imports'; | ||
@@ -24,5 +23,3 @@ import { DeclarationNode } from '../../../reflection'; | ||
/** | ||
* This registry does nothing, since ngtsc does not currently need | ||
* this functionality. | ||
* The ngcc tool implements a working version for its purposes. | ||
* This registry does nothing. | ||
*/ | ||
@@ -29,0 +26,0 @@ export declare class NoopReferencesRegistry implements ReferencesRegistry { |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/schema" /> | ||
import { SchemaMetadata } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/util" /> | ||
import { Expression, FactoryTarget, ParseSourceSpan, R3CompiledExpression, R3FactoryMetadata, R3Reference, Statement, WrappedNodeExpr } from '@angular/compiler'; | ||
@@ -25,3 +24,3 @@ import ts from 'typescript'; | ||
export declare function valueReferenceToExpression(valueRef: TypeValueReference): Expression | null; | ||
export declare function toR3Reference(origin: ts.Node, valueRef: Reference, typeRef: Reference, valueContext: ts.SourceFile, typeContext: ts.SourceFile, refEmitter: ReferenceEmitter): R3Reference; | ||
export declare function toR3Reference(origin: ts.Node, ref: Reference, context: ts.SourceFile, refEmitter: ReferenceEmitter): R3Reference; | ||
export declare function isAngularCore(decorator: Decorator): decorator is Decorator & { | ||
@@ -88,3 +87,3 @@ import: Import; | ||
* The `value` is the exported declaration of the class from its source file. | ||
* The `type` is an expression that would be used by ngcc in the typings (.d.ts) files. | ||
* The `type` is an expression that would be used in the typings (.d.ts) files. | ||
*/ | ||
@@ -97,3 +96,3 @@ export declare function wrapTypeReference(reflector: ReflectionHost, clazz: ClassDeclaration): R3Reference; | ||
*/ | ||
export declare function compileResults(fac: CompileResult, def: R3CompiledExpression, metadataStmt: Statement | null, propName: string): CompileResult[]; | ||
export declare function compileResults(fac: CompileResult, def: R3CompiledExpression, metadataStmt: Statement | null, propName: string, additionalFields: CompileResult[] | null, deferrableImports: Set<ts.ImportDeclaration> | null): CompileResult[]; | ||
export declare function toFactoryMetadata(meta: Omit<R3FactoryMetadata, 'target'>, target: FactoryTarget): R3FactoryMetadata; | ||
@@ -107,1 +106,2 @@ export declare function resolveImportedFile(moduleResolver: ModuleResolver, importedFile: ImportedFile, expr: Expression, origin: ts.SourceFile): ts.SourceFile | null; | ||
export declare function getOriginNodeForDiagnostics(expr: ts.Expression, container: ts.Expression): ts.Expression; | ||
export declare function isAbstractClassDeclaration(clazz: ClassDeclaration): boolean; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component" /> | ||
export { ComponentDecoratorHandler } from './src/handler'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/diagnostics" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Cycle } from '../../../cycles'; |
@@ -8,11 +8,10 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/handler" /> | ||
import { ConstantPool } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { CycleAnalyzer, CycleHandlingStrategy } from '../../../cycles'; | ||
import { ModuleResolver, ReferenceEmitter } from '../../../imports'; | ||
import { DeferredSymbolTracker, ModuleResolver, ReferenceEmitter } from '../../../imports'; | ||
import { DependencyTracker } from '../../../incremental/api'; | ||
import { SemanticDepGraphUpdater } from '../../../incremental/semantic_graph'; | ||
import { IndexingContext } from '../../../indexer'; | ||
import { InjectableClassRegistry, MetadataReader, MetadataRegistry, ResourceRegistry } from '../../../metadata'; | ||
import { HostDirectivesResolver, MetadataReader, MetadataRegistry, ResourceRegistry } from '../../../metadata'; | ||
import { PartialEvaluator } from '../../../partial_evaluator'; | ||
@@ -22,7 +21,7 @@ import { PerfRecorder } from '../../../perf'; | ||
import { ComponentScopeReader, DtsModuleScopeResolver, LocalModuleScopeRegistry, TypeCheckScopeRegistry } from '../../../scope'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerFlags, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { AnalysisOutput, CompilationMode, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { TypeCheckContext } from '../../../typecheck/api'; | ||
import { ExtendedTemplateChecker } from '../../../typecheck/extended/api'; | ||
import { Xi18nContext } from '../../../xi18n'; | ||
import { ResourceLoader } from '../../common'; | ||
import { InjectableClassRegistry, ReferencesRegistry, ResourceLoader } from '../../common'; | ||
import { ComponentAnalysisData, ComponentResolutionData } from './metadata'; | ||
@@ -44,2 +43,3 @@ import { ComponentSymbol } from './symbol'; | ||
private isCore; | ||
private strictCtorDeps; | ||
private resourceLoader; | ||
@@ -52,2 +52,3 @@ private rootDirs; | ||
private i18nNormalizeLineEndingsInICUs; | ||
private enabledBlockTypes; | ||
private moduleResolver; | ||
@@ -57,2 +58,3 @@ private cycleAnalyzer; | ||
private refEmitter; | ||
private referencesRegistry; | ||
private depTracker; | ||
@@ -63,3 +65,7 @@ private injectableRegistry; | ||
private perf; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder); | ||
private hostDirectivesResolver; | ||
private includeClassMetadata; | ||
private readonly compilationMode; | ||
private readonly deferredSymbolTracker; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, enabledBlockTypes: Set<string>, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver, includeClassMetadata: boolean, compilationMode: CompilationMode, deferredSymbolTracker: DeferredSymbolTracker); | ||
private literalCache; | ||
@@ -76,6 +82,6 @@ private elementSchemaRegistry; | ||
readonly precedence = HandlerPrecedence.PRIMARY; | ||
readonly name: string; | ||
readonly name = "ComponentDecoratorHandler"; | ||
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator> | undefined; | ||
preanalyze(node: ClassDeclaration, decorator: Readonly<Decorator>): Promise<void> | undefined; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator>, flags?: HandlerFlags): AnalysisOutput<ComponentAnalysisData>; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator>): AnalysisOutput<ComponentAnalysisData>; | ||
symbol(node: ClassDeclaration, analysis: Readonly<ComponentAnalysisData>): ComponentSymbol; | ||
@@ -91,2 +97,3 @@ register(node: ClassDeclaration, analysis: ComponentAnalysisData): void; | ||
compilePartial(node: ClassDeclaration, analysis: Readonly<ComponentAnalysisData>, resolution: Readonly<ComponentResolutionData>): CompileResult[]; | ||
compileLocal(node: ClassDeclaration, analysis: Readonly<ComponentAnalysisData>, pool: ConstantPool): CompileResult[]; | ||
/** | ||
@@ -100,2 +107,7 @@ * Check whether adding an import from `origin` to the source-file corresponding to `expr` would | ||
private maybeRecordSyntheticImport; | ||
/** | ||
* Resolves information about defer blocks dependencies to make it | ||
* available for the final `compile` step. | ||
*/ | ||
private resolveDeferBlocks; | ||
} |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/metadata" /> | ||
import { AnimationTriggerNames, R3ClassMetadata, R3ComponentMetadata, R3TemplateDependencyMetadata, SchemaMetadata } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Reference } from '../../../imports'; | ||
import { ClassPropertyMapping, ComponentResources, DirectiveTypeCheckMeta } from '../../../metadata'; | ||
import { ClassPropertyMapping, ComponentResources, DirectiveTypeCheckMeta, HostDirectiveMeta, InputMapping } from '../../../metadata'; | ||
import { ClassDeclaration } from '../../../reflection'; | ||
@@ -23,3 +22,3 @@ import { SubsetOfKeys } from '../../../util/src/typescript'; | ||
*/ | ||
export declare type ComponentMetadataResolvedFields = SubsetOfKeys<R3ComponentMetadata<R3TemplateDependencyMetadata>, 'declarations' | 'declarationListEmitMode'>; | ||
export type ComponentMetadataResolvedFields = SubsetOfKeys<R3ComponentMetadata<R3TemplateDependencyMetadata>, 'declarations' | 'declarationListEmitMode' | 'deferBlocks' | 'deferrableDeclToImportDecl'>; | ||
export interface ComponentAnalysisData { | ||
@@ -35,3 +34,3 @@ /** | ||
classMetadata: R3ClassMetadata | null; | ||
inputs: ClassPropertyMapping; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
outputs: ClassPropertyMapping; | ||
@@ -63,3 +62,7 @@ /** | ||
decorator: ts.Decorator | null; | ||
/** Additional directives applied to the component host. */ | ||
hostDirectives: HostDirectiveMeta[] | null; | ||
/** Raw expression that defined the host directives array. Used for diagnostics. */ | ||
rawHostDirectives: ts.Expression | null; | ||
} | ||
export declare type ComponentResolutionData = Pick<R3ComponentMetadata<R3TemplateDependencyMetadata>, ComponentMetadataResolvedFields>; | ||
export type ComponentResolutionData = Pick<R3ComponentMetadata<R3TemplateDependencyMetadata>, ComponentMetadataResolvedFields>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/resources" /> | ||
import { InterpolationConfig, ParsedTemplate, ParseSourceFile, TmplAstNode } from '@angular/compiler'; | ||
@@ -96,3 +95,3 @@ import ts from 'typescript'; | ||
*/ | ||
export declare type TemplateDeclaration = InlineTemplateDeclaration | ExternalTemplateDeclaration; | ||
export type TemplateDeclaration = InlineTemplateDeclaration | ExternalTemplateDeclaration; | ||
/** Determines the node to use for debugging purposes for the given TemplateDeclaration. */ | ||
@@ -104,5 +103,6 @@ export declare function getTemplateDeclarationNodeForError(declaration: TemplateDeclaration): ts.Node; | ||
i18nNormalizeLineEndingsInICUs: boolean; | ||
enabledBlockTypes: Set<string>; | ||
} | ||
export declare function extractTemplate(node: ClassDeclaration, template: TemplateDeclaration, evaluator: PartialEvaluator, depTracker: DependencyTracker | null, resourceLoader: ResourceLoader, options: ExtractTemplateOptions): ParsedTemplateWithSource; | ||
export declare function parseTemplateDeclaration(decorator: Decorator, component: Map<string, ts.Expression>, containingFile: string, evaluator: PartialEvaluator, resourceLoader: ResourceLoader, defaultPreserveWhitespaces: boolean): TemplateDeclaration; | ||
export declare function parseTemplateDeclaration(node: ClassDeclaration, decorator: Decorator, component: Map<string, ts.Expression>, containingFile: string, evaluator: PartialEvaluator, depTracker: DependencyTracker | null, resourceLoader: ResourceLoader, defaultPreserveWhitespaces: boolean): TemplateDeclaration; | ||
export declare function preloadAndParseTemplate(evaluator: PartialEvaluator, resourceLoader: ResourceLoader, depTracker: DependencyTracker | null, preanalyzeTemplateCache: Map<DeclarationNode, ParsedTemplateWithSource>, node: ClassDeclaration, decorator: Decorator, component: Map<string, ts.Expression>, containingFile: string, defaultPreserveWhitespaces: boolean, options: ExtractTemplateOptions): Promise<ParsedTemplateWithSource | null>; | ||
@@ -109,0 +109,0 @@ export declare function makeResourceNotFoundError(file: string, nodeForError: ts.Node, resourceType: ResourceTypeForDiagnostics): FatalDiagnosticError; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/symbol" /> | ||
import { SemanticReference, SemanticSymbol } from '../../../incremental/semantic_graph'; | ||
@@ -11,0 +10,0 @@ import { DirectiveSymbol } from '../../directive'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/util" /> | ||
import { AnimationTriggerNames } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive" /> | ||
export { DirectiveDecoratorHandler } from './src/handler'; | ||
export { DirectiveSymbol } from './src/symbol'; | ||
export * from './src/shared'; |
@@ -8,8 +8,7 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/handler" /> | ||
import { ConstantPool, R3ClassMetadata, R3DirectiveMetadata } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Reference } from '../../../imports'; | ||
import { Reference, ReferenceEmitter } from '../../../imports'; | ||
import { SemanticDepGraphUpdater } from '../../../incremental/semantic_graph'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta, InjectableClassRegistry, MetadataReader, MetadataRegistry } from '../../../metadata'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta, HostDirectiveMeta, InputMapping, MetadataReader, MetadataRegistry } from '../../../metadata'; | ||
import { PartialEvaluator } from '../../../partial_evaluator'; | ||
@@ -19,3 +18,4 @@ import { PerfRecorder } from '../../../perf'; | ||
import { LocalModuleScopeRegistry } from '../../../scope'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerFlags, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { InjectableClassRegistry, ReferencesRegistry } from '../../common'; | ||
import { DirectiveSymbol } from './symbol'; | ||
@@ -28,3 +28,3 @@ export interface DirectiveHandlerData { | ||
providersRequiringFactory: Set<Reference<ClassDeclaration>> | null; | ||
inputs: ClassPropertyMapping; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
outputs: ClassPropertyMapping; | ||
@@ -34,2 +34,4 @@ isPoisoned: boolean; | ||
decorator: ts.Decorator | null; | ||
hostDirectives: HostDirectiveMeta[] | null; | ||
rawHostDirectives: ts.Expression | null; | ||
} | ||
@@ -43,12 +45,15 @@ export declare class DirectiveDecoratorHandler implements DecoratorHandler<Decorator | null, DirectiveHandlerData, DirectiveSymbol, unknown> { | ||
private injectableRegistry; | ||
private refEmitter; | ||
private referencesRegistry; | ||
private isCore; | ||
private strictCtorDeps; | ||
private semanticDepGraphUpdater; | ||
private annotateForClosureCompiler; | ||
private compileUndecoratedClassesWithAngularFeatures; | ||
private perf; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, isCore: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, compileUndecoratedClassesWithAngularFeatures: boolean, perf: PerfRecorder); | ||
private includeClassMetadata; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, isCore: boolean, strictCtorDeps: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, includeClassMetadata: boolean); | ||
readonly precedence = HandlerPrecedence.PRIMARY; | ||
readonly name: string; | ||
readonly name = "DirectiveDecoratorHandler"; | ||
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator | null> | undefined; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator | null>, flags?: HandlerFlags): AnalysisOutput<DirectiveHandlerData>; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator | null>): AnalysisOutput<DirectiveHandlerData>; | ||
symbol(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>): DirectiveSymbol; | ||
@@ -59,2 +64,3 @@ register(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>): void; | ||
compilePartial(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>, resolution: Readonly<unknown>): CompileResult[]; | ||
compileLocal(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>, pool: ConstantPool): CompileResult[]; | ||
/** | ||
@@ -61,0 +67,0 @@ * Checks if a given class uses Angular features and returns the TypeScript node |
@@ -8,9 +8,9 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/shared" /> | ||
import { ParsedHostBindings, R3DirectiveMetadata, R3QueryMetadata } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { ClassPropertyMapping } from '../../../metadata'; | ||
import { ReferenceEmitter } from '../../../imports'; | ||
import { ClassPropertyMapping, HostDirectiveMeta, InputMapping } from '../../../metadata'; | ||
import { PartialEvaluator } from '../../../partial_evaluator'; | ||
import { ClassDeclaration, ClassMember, Decorator, ReflectionHost } from '../../../reflection'; | ||
import { HandlerFlags } from '../../../transform'; | ||
import { ReferencesRegistry } from '../../common'; | ||
/** | ||
@@ -22,11 +22,13 @@ * Helper function to extract metadata from a `Directive` or `Component`. `Directive`s without a | ||
*/ | ||
export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decorator: Readonly<Decorator | null>, reflector: ReflectionHost, evaluator: PartialEvaluator, isCore: boolean, flags: HandlerFlags, annotateForClosureCompiler: boolean, defaultSelector?: string | null): { | ||
export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decorator: Readonly<Decorator | null>, reflector: ReflectionHost, evaluator: PartialEvaluator, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, isCore: boolean, annotateForClosureCompiler: boolean, defaultSelector?: string | null): { | ||
decorator: Map<string, ts.Expression>; | ||
metadata: R3DirectiveMetadata; | ||
inputs: ClassPropertyMapping; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
outputs: ClassPropertyMapping; | ||
isStructural: boolean; | ||
hostDirectives: HostDirectiveMeta[] | null; | ||
rawHostDirectives: ts.Expression | null; | ||
} | undefined; | ||
export declare function extractQueryMetadata(exprNode: ts.Node, name: string, args: ReadonlyArray<ts.Expression>, propertyName: string, reflector: ReflectionHost, evaluator: PartialEvaluator): R3QueryMetadata; | ||
export declare function extractHostBindings(members: ClassMember[], evaluator: PartialEvaluator, coreModule: string | undefined, metadata?: Map<string, ts.Expression>): ParsedHostBindings; | ||
export declare function parseFieldArrayValue(directive: Map<string, ts.Expression>, field: string, evaluator: PartialEvaluator): null | string[]; | ||
export declare function parseFieldStringArrayValue(directive: Map<string, ts.Expression>, field: string, evaluator: PartialEvaluator): null | string[]; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/symbol" /> | ||
import { SemanticSymbol, SemanticTypeParameter } from '../../../incremental/semantic_graph'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta } from '../../../metadata'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta, InputMapping } from '../../../metadata'; | ||
import { ClassDeclaration } from '../../../reflection'; | ||
@@ -19,3 +18,3 @@ /** | ||
readonly selector: string | null; | ||
readonly inputs: ClassPropertyMapping; | ||
readonly inputs: ClassPropertyMapping<InputMapping>; | ||
readonly outputs: ClassPropertyMapping; | ||
@@ -26,5 +25,5 @@ readonly exportAs: string[] | null; | ||
baseClass: SemanticSymbol | null; | ||
constructor(decl: ClassDeclaration, selector: string | null, inputs: ClassPropertyMapping, outputs: ClassPropertyMapping, exportAs: string[] | null, typeCheckMeta: DirectiveTypeCheckMeta, typeParameters: SemanticTypeParameter[] | null); | ||
constructor(decl: ClassDeclaration, selector: string | null, inputs: ClassPropertyMapping<InputMapping>, outputs: ClassPropertyMapping, exportAs: string[] | null, typeCheckMeta: DirectiveTypeCheckMeta, typeParameters: SemanticTypeParameter[] | null); | ||
isPublicApiAffected(previousSymbol: SemanticSymbol): boolean; | ||
isTypeCheckApiAffected(previousSymbol: SemanticSymbol): boolean; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations" /> | ||
export { forwardRefResolver, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext } from './common'; | ||
@@ -11,0 +10,0 @@ export { ComponentDecoratorHandler } from './component'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/ng_module" /> | ||
export { NgModuleDecoratorHandler, NgModuleSymbol } from './src/handler'; | ||
export { createModuleWithProvidersResolver, isResolvedModuleWithProviders, ResolvedModuleWithProviders } from './src/module_with_providers'; |
@@ -8,8 +8,7 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/ng_module/src/handler" /> | ||
import { Expression, R3ClassMetadata, R3FactoryMetadata, R3InjectorMetadata, R3NgModuleMetadata, SchemaMetadata } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Reference, ReferenceEmitter } from '../../../imports'; | ||
import { SemanticReference, SemanticSymbol } from '../../../incremental/semantic_graph'; | ||
import { InjectableClassRegistry, MetadataReader, MetadataRegistry } from '../../../metadata'; | ||
import { SemanticDepGraphUpdater, SemanticReference, SemanticSymbol } from '../../../incremental/semantic_graph'; | ||
import { ExportedProviderStatusResolver, MetadataReader, MetadataRegistry } from '../../../metadata'; | ||
import { PartialEvaluator } from '../../../partial_evaluator'; | ||
@@ -19,5 +18,4 @@ import { PerfRecorder } from '../../../perf'; | ||
import { LocalModuleScopeRegistry } from '../../../scope'; | ||
import { FactoryTracker } from '../../../shims/api'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { ReferencesRegistry } from '../../common'; | ||
import { AnalysisOutput, CompilationMode, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform'; | ||
import { InjectableClassRegistry, ReferencesRegistry } from '../../common'; | ||
export interface NgModuleAnalysis { | ||
@@ -50,3 +48,15 @@ mod: R3NgModuleMetadata; | ||
export declare class NgModuleSymbol extends SemanticSymbol { | ||
readonly hasProviders: boolean; | ||
private remotelyScopedComponents; | ||
/** | ||
* `SemanticSymbol`s of the transitive imports of this NgModule which came from imported | ||
* standalone components. | ||
* | ||
* Standalone components are excluded/included in the `InjectorDef` emit output of the NgModule | ||
* based on whether the compiler can prove that their transitive imports may contain exported | ||
* providers, so a change in this set of symbols may affect the compilation output of this | ||
* NgModule. | ||
*/ | ||
private transitiveImportsFromStandaloneComponents; | ||
constructor(decl: ClassDeclaration, hasProviders: boolean); | ||
isPublicApiAffected(previousSymbol: SemanticSymbol): boolean; | ||
@@ -56,2 +66,3 @@ isEmitAffected(previousSymbol: SemanticSymbol): boolean; | ||
addRemotelyScopedComponent(component: SemanticSymbol, usedDirectives: SemanticReference[], usedPipes: SemanticReference[]): void; | ||
addTransitiveImportFromStandaloneComponent(importedSymbol: SemanticSymbol): void; | ||
} | ||
@@ -68,5 +79,6 @@ /** | ||
private referencesRegistry; | ||
private exportedProviderStatusResolver; | ||
private semanticDepGraphUpdater; | ||
private isCore; | ||
private refEmitter; | ||
private factoryTracker; | ||
private annotateForClosureCompiler; | ||
@@ -76,8 +88,11 @@ private onlyPublishPublicTypings; | ||
private perf; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaReader: MetadataReader, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, referencesRegistry: ReferencesRegistry, isCore: boolean, refEmitter: ReferenceEmitter, factoryTracker: FactoryTracker | null, annotateForClosureCompiler: boolean, onlyPublishPublicTypings: boolean, injectableRegistry: InjectableClassRegistry, perf: PerfRecorder); | ||
private includeClassMetadata; | ||
private includeSelectorScope; | ||
private readonly compilationMode; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaReader: MetadataReader, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, referencesRegistry: ReferencesRegistry, exportedProviderStatusResolver: ExportedProviderStatusResolver, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, isCore: boolean, refEmitter: ReferenceEmitter, annotateForClosureCompiler: boolean, onlyPublishPublicTypings: boolean, injectableRegistry: InjectableClassRegistry, perf: PerfRecorder, includeClassMetadata: boolean, includeSelectorScope: boolean, compilationMode: CompilationMode); | ||
readonly precedence = HandlerPrecedence.PRIMARY; | ||
readonly name: string; | ||
readonly name = "NgModuleDecoratorHandler"; | ||
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator> | undefined; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator>): AnalysisOutput<NgModuleAnalysis>; | ||
symbol(node: ClassDeclaration): NgModuleSymbol; | ||
symbol(node: ClassDeclaration, analysis: NgModuleAnalysis): NgModuleSymbol; | ||
register(node: ClassDeclaration, analysis: NgModuleAnalysis): void; | ||
@@ -87,2 +102,3 @@ resolve(node: ClassDeclaration, analysis: Readonly<NgModuleAnalysis>): ResolveResult<NgModuleResolution>; | ||
compilePartial(node: ClassDeclaration, { inj, fac, mod, classMetadata }: Readonly<NgModuleAnalysis>, { injectorImports }: Readonly<NgModuleResolution>): CompileResult[]; | ||
compileLocal(node: ClassDeclaration, { inj, mod, fac, classMetadata, declarations, remoteScopesMayRequireCycleProtection }: Readonly<NgModuleAnalysis>): CompileResult[]; | ||
/** | ||
@@ -89,0 +105,0 @@ * Add class metadata statements, if provided, to the `ngModuleStatements`. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../../imports'; |
@@ -8,8 +8,8 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/src/injectable" /> | ||
import { R3ClassMetadata, R3DependencyMetadata, R3InjectableMetadata } from '@angular/compiler'; | ||
import { InjectableClassRegistry } from '../../metadata'; | ||
import { InjectableClassRegistry } from '../../annotations/common'; | ||
import { PartialEvaluator } from '../../partial_evaluator'; | ||
import { PerfRecorder } from '../../perf'; | ||
import { ClassDeclaration, Decorator, ReflectionHost } from '../../reflection'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence } from '../../transform'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../transform'; | ||
export interface InjectableHandlerData { | ||
@@ -26,2 +26,3 @@ meta: R3InjectableMetadata; | ||
private reflector; | ||
private evaluator; | ||
private isCore; | ||
@@ -31,2 +32,3 @@ private strictCtorDeps; | ||
private perf; | ||
private includeClassMetadata; | ||
/** | ||
@@ -39,3 +41,3 @@ * What to do if the injectable already contains a ɵprov property. | ||
private errorOnDuplicateProv; | ||
constructor(reflector: ReflectionHost, isCore: boolean, strictCtorDeps: boolean, injectableRegistry: InjectableClassRegistry, perf: PerfRecorder, | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, isCore: boolean, strictCtorDeps: boolean, injectableRegistry: InjectableClassRegistry, perf: PerfRecorder, includeClassMetadata: boolean, | ||
/** | ||
@@ -49,10 +51,12 @@ * What to do if the injectable already contains a ɵprov property. | ||
readonly precedence = HandlerPrecedence.SHARED; | ||
readonly name: string; | ||
readonly name = "InjectableDecoratorHandler"; | ||
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator> | undefined; | ||
analyze(node: ClassDeclaration, decorator: Readonly<Decorator>): AnalysisOutput<InjectableHandlerData>; | ||
symbol(): null; | ||
register(node: ClassDeclaration): void; | ||
register(node: ClassDeclaration, analysis: InjectableHandlerData): void; | ||
resolve(node: ClassDeclaration, analysis: Readonly<InjectableHandlerData>, symbol: null): ResolveResult<unknown>; | ||
compileFull(node: ClassDeclaration, analysis: Readonly<InjectableHandlerData>): CompileResult[]; | ||
compilePartial(node: ClassDeclaration, analysis: Readonly<InjectableHandlerData>): CompileResult[]; | ||
compileLocal(node: ClassDeclaration, analysis: Readonly<InjectableHandlerData>): CompileResult[]; | ||
private compile; | ||
} |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/src/pipe" /> | ||
import { R3ClassMetadata, R3PipeMetadata } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { SemanticSymbol } from '../../incremental/semantic_graph'; | ||
import { InjectableClassRegistry, MetadataRegistry } from '../../metadata'; | ||
import { MetadataRegistry } from '../../metadata'; | ||
import { PartialEvaluator } from '../../partial_evaluator'; | ||
@@ -19,2 +18,3 @@ import { PerfRecorder } from '../../perf'; | ||
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../transform'; | ||
import { InjectableClassRegistry } from '../common'; | ||
export interface PipeHandlerData { | ||
@@ -43,5 +43,6 @@ meta: R3PipeMetadata; | ||
private perf; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, injectableRegistry: InjectableClassRegistry, isCore: boolean, perf: PerfRecorder); | ||
private includeClassMetadata; | ||
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, injectableRegistry: InjectableClassRegistry, isCore: boolean, perf: PerfRecorder, includeClassMetadata: boolean); | ||
readonly precedence = HandlerPrecedence.PRIMARY; | ||
readonly name: string; | ||
readonly name = "PipeDecoratorHandler"; | ||
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator> | undefined; | ||
@@ -54,2 +55,3 @@ analyze(clazz: ClassDeclaration, decorator: Readonly<Decorator>): AnalysisOutput<PipeHandlerData>; | ||
compilePartial(node: ClassDeclaration, analysis: Readonly<PipeHandlerData>): CompileResult[]; | ||
compileLocal(node: ClassDeclaration, analysis: Readonly<PipeHandlerData>): CompileResult[]; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/api/index" /> | ||
export * from './src/adapter'; | ||
@@ -11,0 +10,0 @@ export * from './src/interfaces'; |
@@ -8,6 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/api/src/adapter" /> | ||
import ts from 'typescript'; | ||
import { AbsoluteFsPath } from '../../../file_system'; | ||
import { FactoryTracker } from '../../../shims/api'; | ||
import { ExtendedTsCompilerHost, UnifiedModulesHost } from './interfaces'; | ||
@@ -18,3 +16,3 @@ /** | ||
*/ | ||
export declare type ExtendedCompilerHostMethods = 'getCanonicalFileName' | 'resolveModuleNames' | 'getCurrentDirectory' | 'getModifiedResourceFiles' | 'readResource' | 'resourceNameToFileName' | 'transformResource'; | ||
export type ExtendedCompilerHostMethods = 'getCanonicalFileName' | 'resolveModuleNames' | 'getCurrentDirectory' | 'getModifiedResourceFiles' | 'readResource' | 'resourceNameToFileName' | 'transformResource'; | ||
/** | ||
@@ -50,8 +48,2 @@ * Adapter for `NgCompiler` that allows it to be used in various circumstances, such as | ||
/** | ||
* A tracker for usage of symbols in `.ngfactory` shims. | ||
* | ||
* This can be left `null` if such shims are not a part of the `ts.Program`. | ||
*/ | ||
readonly factoryTracker: FactoryTracker | null; | ||
/** | ||
* A specialized interface provided in some environments (such as Bazel) which overrides how | ||
@@ -58,0 +50,0 @@ * import specifiers are generated. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/api/src/interfaces" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/api/src/options" /> | ||
import ts from 'typescript'; | ||
import { BazelAndG3Options, DiagnosticOptions, I18nOptions, LegacyNgcOptions, MiscOptions, NgcCompatibilityOptions, StrictTemplateOptions, TargetOptions } from './public_options'; | ||
import { BazelAndG3Options, DiagnosticOptions, I18nOptions, LegacyNgcOptions, MiscOptions, StrictTemplateOptions, TargetOptions } from './public_options'; | ||
/** | ||
@@ -41,4 +40,4 @@ * Non-public options which are useful during testing of the compiler. | ||
*/ | ||
export interface NgCompilerOptions extends ts.CompilerOptions, LegacyNgcOptions, BazelAndG3Options, DiagnosticOptions, NgcCompatibilityOptions, StrictTemplateOptions, TestOnlyOptions, I18nOptions, TargetOptions, InternalOptions, MiscOptions { | ||
export interface NgCompilerOptions extends ts.CompilerOptions, LegacyNgcOptions, BazelAndG3Options, DiagnosticOptions, StrictTemplateOptions, TestOnlyOptions, I18nOptions, TargetOptions, InternalOptions, MiscOptions { | ||
[prop: string]: any; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/api/src/public_options" /> | ||
import { ExtendedTemplateDiagnosticName } from '../../../../ngtsc/diagnostics'; | ||
@@ -20,3 +19,6 @@ /** | ||
export interface LegacyNgcOptions { | ||
/** generate all possible generated files */ | ||
/** | ||
* generate all possible generated files | ||
* @deprecated This option is not used anymore. | ||
*/ | ||
allowEmptyCodegenFiles?: boolean; | ||
@@ -84,38 +86,2 @@ /** | ||
/** | ||
* Options which were added to the Angular Ivy compiler to support backwards compatibility with | ||
* existing View Engine applications. | ||
* | ||
* These are expected to be removed at some point in the future. | ||
* | ||
* @publicApi | ||
*/ | ||
export interface NgcCompatibilityOptions { | ||
/** | ||
* Controls whether ngtsc will emit `.ngfactory.js` shims for each compiled `.ts` file. | ||
* | ||
* These shims support legacy imports from `ngfactory` files, by exporting a factory shim | ||
* for each component or NgModule in the original `.ts` file. | ||
*/ | ||
generateNgFactoryShims?: boolean; | ||
/** | ||
* Controls whether ngtsc will emit `.ngsummary.js` shims for each compiled `.ts` file. | ||
* | ||
* These shims support legacy imports from `ngsummary` files, by exporting an empty object | ||
* for each NgModule in the original `.ts` file. The only purpose of summaries is to feed them to | ||
* `TestBed`, which is a no-op in Ivy. | ||
*/ | ||
generateNgSummaryShims?: boolean; | ||
/** | ||
* Tells the compiler to generate definitions using the Render3 style code generation. | ||
* This option defaults to `true`. | ||
* | ||
* Acceptable values are as follows: | ||
* | ||
* `false` - run ngc normally | ||
* `true` - run the ngtsc compiler instead of the normal ngc compiler | ||
* `ngtsc` - alias for `true` | ||
*/ | ||
enableIvy?: boolean | 'ngtsc'; | ||
} | ||
/** | ||
* Options related to template type-checking and its strictness. | ||
@@ -358,3 +324,2 @@ * | ||
* | ||
* This is only active if we are building with `enableIvy: true`. | ||
* The default value for now is `true`. | ||
@@ -394,6 +359,9 @@ * | ||
* - 'partial': generates code in a stable, but intermediate form suitable for publication to NPM. | ||
* - 'experimental-local': generates code based on each individual source file without using its | ||
* dependencies. This mode is suitable only for fast edit/refresh during development. It will be | ||
* eventually replaced by the value `local` once the feature is ready to be public. | ||
* | ||
* The default value is 'full'. | ||
*/ | ||
compilationMode?: 'full' | 'partial'; | ||
compilationMode?: 'full' | 'partial' | 'experimental-local'; | ||
} | ||
@@ -408,3 +376,3 @@ /** | ||
* Whether the compiler should avoid generating code for classes that haven't been exported. | ||
* This is only active when building with `enableIvy: true`. Defaults to `true`. | ||
* Defaults to `true`. | ||
*/ | ||
@@ -411,0 +379,0 @@ compileNonExportedClasses?: boolean; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core" /> | ||
export * from './src/compiler'; | ||
export { NgCompilerHost } from './src/host'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/src/compiler" /> | ||
import ts from 'typescript'; | ||
@@ -69,3 +68,3 @@ import { AbsoluteFsPath } from '../../file_system'; | ||
*/ | ||
export declare type CompilationTicket = FreshCompilationTicket | IncrementalTypeScriptCompilationTicket | IncrementalResourceCompilationTicket; | ||
export type CompilationTicket = FreshCompilationTicket | IncrementalTypeScriptCompilationTicket | IncrementalResourceCompilationTicket; | ||
/** | ||
@@ -132,2 +131,3 @@ * Create a `CompilationTicket` for a brand new compilation, using no prior state. | ||
private cycleAnalyzer; | ||
private enabledBlockTypes; | ||
readonly ignoreForDiagnostics: Set<ts.SourceFile>; | ||
@@ -154,9 +154,2 @@ readonly ignoreForEmit: Set<ts.SourceFile>; | ||
get perfRecorder(): ActivePerfRecorder; | ||
/** | ||
* Exposes the `IncrementalCompilation` under an old property name that the CLI uses, avoiding a | ||
* chicken-and-egg problem with the rename to `incrementalCompilation`. | ||
* | ||
* TODO(alxhub): remove when the CLI uses the new name. | ||
*/ | ||
get incrementalDriver(): IncrementalCompilation; | ||
private updateWithChangedResources; | ||
@@ -163,0 +156,0 @@ /** |
@@ -8,7 +8,5 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/core/src/host" /> | ||
import ts from 'typescript'; | ||
import { AbsoluteFsPath } from '../../file_system'; | ||
import { ShimAdapter, ShimReferenceTagger } from '../../shims'; | ||
import { FactoryTracker } from '../../shims/api'; | ||
import { RequiredDelegations } from '../../util/src/typescript'; | ||
@@ -25,4 +23,2 @@ import { ExtendedTsCompilerHost, NgCompilerAdapter, NgCompilerOptions, UnifiedModulesHost } from '../api'; | ||
protected delegate: ExtendedTsCompilerHost; | ||
constructor(delegate: ExtendedTsCompilerHost); | ||
private delegateMethod; | ||
createHash: ((data: string) => string) | undefined; | ||
@@ -45,6 +41,6 @@ directoryExists: ((directoryName: string) => boolean) | undefined; | ||
readResource: ((fileName: string) => string | Promise<string>) | undefined; | ||
transformResource: ((data: string, context: import("@angular/compiler-cli/src/ngtsc/core/api/index").ResourceHostContext) => Promise<import("@angular/compiler-cli/src/ngtsc/core/api/index").TransformResourceResult | null>) | undefined; | ||
transformResource: ((data: string, context: import("../api").ResourceHostContext) => Promise<import("../api").TransformResourceResult | null>) | undefined; | ||
realpath: ((path: string) => string) | undefined; | ||
resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | undefined; | ||
resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined; | ||
resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ResolutionMode) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined; | ||
resourceNameToFileName: ((resourceName: string, containingFilePath: string, fallbackResolve?: ((url: string, fromFile: string) => string | null) | undefined) => string | null) | undefined; | ||
@@ -55,2 +51,7 @@ trace: ((s: string) => void) | undefined; | ||
getModuleResolutionCache: (() => ts.ModuleResolutionCache | undefined) | undefined; | ||
hasInvalidatedResolutions: ((filePath: ts.Path) => boolean) | undefined; | ||
resolveModuleNameLiterals: ((moduleLiterals: readonly ts.StringLiteralLike[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile: ts.SourceFile, reusedNames: readonly ts.StringLiteralLike[] | undefined) => readonly ts.ResolvedModuleWithFailedLookupLocations[]) | undefined; | ||
resolveTypeReferenceDirectiveReferences: (<T extends string | ts.FileReference>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile: ts.SourceFile | undefined, reusedNames: readonly T[] | undefined) => readonly ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]) | undefined; | ||
constructor(delegate: ExtendedTsCompilerHost); | ||
private delegateMethod; | ||
} | ||
@@ -61,4 +62,4 @@ /** | ||
* In order for a consumer to include Angular compilation in their TypeScript compiler, the | ||
* `ts.Program` must be created with a host that adds Angular-specific files (e.g. factories, | ||
* summaries, the template type-checking file, etc) to the compilation. `NgCompilerHost` is the | ||
* `ts.Program` must be created with a host that adds Angular-specific files (e.g. | ||
* the template type-checking file, etc) to the compilation. `NgCompilerHost` is the | ||
* host implementation which supports this. | ||
@@ -72,3 +73,2 @@ * | ||
private shimTagger; | ||
readonly factoryTracker: FactoryTracker | null; | ||
readonly entryPoint: AbsoluteFsPath | null; | ||
@@ -78,3 +78,3 @@ readonly constructionDiagnostics: ts.Diagnostic[]; | ||
readonly rootDirs: ReadonlyArray<AbsoluteFsPath>; | ||
constructor(delegate: ExtendedTsCompilerHost, inputFiles: ReadonlyArray<string>, rootDirs: ReadonlyArray<AbsoluteFsPath>, shimAdapter: ShimAdapter, shimTagger: ShimReferenceTagger, entryPoint: AbsoluteFsPath | null, factoryTracker: FactoryTracker | null, diagnostics: ts.Diagnostic[]); | ||
constructor(delegate: ExtendedTsCompilerHost, inputFiles: ReadonlyArray<string>, rootDirs: ReadonlyArray<AbsoluteFsPath>, shimAdapter: ShimAdapter, shimTagger: ShimReferenceTagger, entryPoint: AbsoluteFsPath | null, diagnostics: ts.Diagnostic[]); | ||
/** | ||
@@ -81,0 +81,0 @@ * Retrieves a set of `ts.SourceFile`s which should not be emitted as JS files. |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/cycles" /> | ||
export { Cycle, CycleAnalyzer, CycleHandlingStrategy } from './src/analyzer'; | ||
export { ImportGraph } from './src/imports'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/cycles/src/analyzer" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ImportGraph } from './imports'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/cycles/src/imports" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { PerfRecorder } from '../../perf'; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics" /> | ||
export { COMPILER_ERRORS_WITH_GUIDES } from './src/docs'; | ||
export { FatalDiagnosticError, isFatalDiagnosticError, makeDiagnostic, makeDiagnosticChain, makeRelatedInformation } from './src/error'; | ||
export { addDiagnosticChain, FatalDiagnosticError, isFatalDiagnosticError, makeDiagnostic, makeDiagnosticChain, makeRelatedInformation } from './src/error'; | ||
export { ErrorCode } from './src/error_code'; | ||
@@ -13,0 +12,0 @@ export { ERROR_DETAILS_PAGE_BASE_URL } from './src/error_details_base_url'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/docs" /> | ||
import { ErrorCode } from './error_code'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/error_code" /> | ||
/** | ||
@@ -63,2 +62,36 @@ * @publicApi | ||
COMPONENT_UNKNOWN_IMPORT = 2012, | ||
/** | ||
* Raised when the compiler wasn't able to resolve the metadata of a host directive. | ||
*/ | ||
HOST_DIRECTIVE_INVALID = 2013, | ||
/** | ||
* Raised when a host directive isn't standalone. | ||
*/ | ||
HOST_DIRECTIVE_NOT_STANDALONE = 2014, | ||
/** | ||
* Raised when a host directive is a component. | ||
*/ | ||
HOST_DIRECTIVE_COMPONENT = 2015, | ||
/** | ||
* Raised when a type with Angular decorator inherits its constructor from a base class | ||
* which has a constructor that is incompatible with Angular DI. | ||
*/ | ||
INJECTABLE_INHERITS_INVALID_CONSTRUCTOR = 2016, | ||
/** Raised when a host tries to alias a host directive binding that does not exist. */ | ||
HOST_DIRECTIVE_UNDEFINED_BINDING = 2017, | ||
/** | ||
* Raised when a host tries to alias a host directive | ||
* binding to a pre-existing binding's public name. | ||
*/ | ||
HOST_DIRECTIVE_CONFLICTING_ALIAS = 2018, | ||
/** | ||
* Raised when a host directive definition doesn't expose a | ||
* required binding from the host directive. | ||
*/ | ||
HOST_DIRECTIVE_MISSING_REQUIRED_BINDING = 2019, | ||
/** | ||
* Raised when a component specifies both a `transform` function on an input | ||
* and has a corresponding `ngAcceptInputType_` member for the same input. | ||
*/ | ||
CONFLICTING_INPUT_TRANSFORM = 2020, | ||
SYMBOL_NOT_EXPORTED = 3001, | ||
@@ -182,2 +215,6 @@ /** | ||
/** | ||
* A directive usage isn't binding to one or more required inputs. | ||
*/ | ||
MISSING_REQUIRED_INPUTS = 8008, | ||
/** | ||
* A two way binding in a template has an incorrect syntax, | ||
@@ -254,2 +291,14 @@ * parentheses outside brackets. For example: | ||
/** | ||
* `ngSkipHydration` should not be a binding (it should be a static attribute). | ||
* | ||
* For example: | ||
* ``` | ||
* <my-cmp [ngSkipHydration]="someTruthyVar" /> | ||
* ``` | ||
* | ||
* `ngSkipHydration` cannot be a binding and can not have values other than "true" or an empty | ||
* value | ||
*/ | ||
SKIP_HYDRATION_NOT_STATIC = 8108, | ||
/** | ||
* The template type-checking engine would need to generate an inline type check block for a | ||
@@ -256,0 +305,0 @@ * component, but the current type-checking environment doesn't support it. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Base URL for the error details page. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/error" /> | ||
import ts from 'typescript'; | ||
@@ -23,2 +22,3 @@ import { ErrorCode } from './error_code'; | ||
export declare function makeRelatedInformation(node: ts.Node, messageText: string): ts.DiagnosticRelatedInformation; | ||
export declare function addDiagnosticChain(messageText: string | ts.DiagnosticMessageChain, add: ts.DiagnosticMessageChain[]): ts.DiagnosticMessageChain; | ||
export declare function isFatalDiagnosticError(err: any): err is FatalDiagnosticError; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name" /> | ||
/** | ||
@@ -26,3 +25,4 @@ * Enum holding the name of each extended template diagnostic. The name is used as a user-meaningful | ||
MISSING_NGFOROF_LET = "missingNgForOfLet", | ||
SUFFIX_NOT_SUPPORTED = "suffixNotSupported" | ||
SUFFIX_NOT_SUPPORTED = "suffixNotSupported", | ||
SKIP_HYDRATION_NOT_STATIC = "skipHydrationNotStatic" | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/diagnostics/src/util" /> | ||
import { ErrorCode } from './error_code'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/entry_point" /> | ||
export { FlatIndexGenerator } from './src/generator'; | ||
@@ -11,0 +10,0 @@ export { findFlatIndexEntryPoint } from './src/logic'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/entry_point/src/generator" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/entry_point/src/logic" /> | ||
import { AbsoluteFsPath } from '../../file_system'; | ||
export declare function findFlatIndexEntryPoint(rootFiles: ReadonlyArray<AbsoluteFsPath>): AbsoluteFsPath | null; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/entry_point/src/private_export_checker" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ReferenceGraph } from './reference_graph'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/entry_point/src/reference_graph" /> | ||
import { DeclarationNode } from '../../reflection'; | ||
@@ -11,0 +10,0 @@ export declare class ReferenceGraph<T = DeclarationNode> { |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/compiler_host" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { FileSystem } from './types'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/helpers" /> | ||
import { AbsoluteFsPath, FileSystem, PathSegment, PathString } from './types'; | ||
@@ -3,0 +2,0 @@ export declare function getFileSystem(): FileSystem; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/invalid_file_system" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/logical" /> | ||
/** | ||
@@ -17,3 +16,3 @@ * @license | ||
*/ | ||
export declare type LogicalProjectPath = BrandedPath<'LogicalProjectPath'>; | ||
export type LogicalProjectPath = BrandedPath<'LogicalProjectPath'>; | ||
export declare const LogicalProjectPath: { | ||
@@ -20,0 +19,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/node_js_file_system" /> | ||
import { AbsoluteFsPath, FileStats, FileSystem, PathManipulation, PathSegment, PathString, ReadonlyFileSystem } from './types'; | ||
@@ -45,3 +44,2 @@ /** | ||
removeDeep(path: AbsoluteFsPath): void; | ||
private safeMkdir; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/types" /> | ||
/** | ||
@@ -16,3 +15,3 @@ * A `string` representing a specific type of path, with a particular brand `B`. | ||
*/ | ||
export declare type BrandedPath<B extends string> = string & { | ||
export type BrandedPath<B extends string> = string & { | ||
_brand: B; | ||
@@ -23,3 +22,3 @@ }; | ||
*/ | ||
export declare type AbsoluteFsPath = BrandedPath<'AbsoluteFsPath'>; | ||
export type AbsoluteFsPath = BrandedPath<'AbsoluteFsPath'>; | ||
/** | ||
@@ -30,3 +29,3 @@ * A path that's relative to another (unspecified) root. | ||
*/ | ||
export declare type PathSegment = BrandedPath<'PathSegment'>; | ||
export type PathSegment = BrandedPath<'PathSegment'>; | ||
/** | ||
@@ -85,3 +84,3 @@ * An abstraction over the path manipulation aspects of a file-system. | ||
} | ||
export declare type PathString = string | AbsoluteFsPath | PathSegment; | ||
export type PathString = string | AbsoluteFsPath | PathSegment; | ||
/** | ||
@@ -88,0 +87,0 @@ * Information about an object in the FileSystem. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/file_system/src/util" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,9 +8,10 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports" /> | ||
export { AliasingHost, AliasStrategy, PrivateExportAliasingHost, UnifiedModulesAliasingHost } from './src/alias'; | ||
export { ImportRewriter, NoopImportRewriter, R3SymbolsImportRewriter, validateAndRewriteCoreSymbol } from './src/core'; | ||
export { DefaultImportTracker } from './src/default'; | ||
export { DeferredSymbolTracker } from './src/deferred_symbol_tracker'; | ||
export { AbsoluteModuleStrategy, assertSuccessfulReferenceEmit, EmittedReference, FailedEmitResult, ImportedFile, ImportFlags, LocalIdentifierStrategy, LogicalProjectStrategy, ReferenceEmitKind, ReferenceEmitResult, ReferenceEmitStrategy, ReferenceEmitter, RelativePathStrategy, UnifiedModulesStrategy } from './src/emitter'; | ||
export { isAliasImportDeclaration, loadIsReferencedAliasDeclarationPatch } from './src/patch_alias_reference_resolution'; | ||
export { Reexport } from './src/reexport'; | ||
export { OwningModule, Reference } from './src/references'; | ||
export { ModuleResolver } from './src/resolver'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/alias" /> | ||
import { Expression } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/core" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Rewrites imports of symbols being written into generated code. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/default" /> | ||
import { WrappedNodeExpr } from '@angular/compiler'; | ||
@@ -44,6 +43,6 @@ import ts from 'typescript'; | ||
* | ||
* To avoid this, the compiler must "touch" the imports with `ts.getMutableClone`, and should | ||
* only do this for imports which are actually consumed. The `DefaultImportTracker` keeps track of | ||
* these imports as they're encountered and emitted, and implements a transform which can correctly | ||
* flag the imports as required. | ||
* To avoid this, the compiler must patch the emit resolver, and should only do this for imports | ||
* which are actually consumed. The `DefaultImportTracker` keeps track of these imports as they're | ||
* encountered and emitted, and implements a transform which can correctly flag the imports as | ||
* required. | ||
* | ||
@@ -55,4 +54,4 @@ * This problem does not exist for non-default imports as the compiler can easily insert | ||
/** | ||
* A `Map` which tracks the `Set` of `ts.ImportDeclaration`s for default imports that were used in | ||
* a given `ts.SourceFile` and need to be preserved. | ||
* A `Map` which tracks the `Set` of `ts.ImportClause`s for default imports that were used in | ||
* a given file name. | ||
*/ | ||
@@ -68,6 +67,2 @@ private sourceFileToUsedImports; | ||
importPreservingTransformer(): ts.TransformerFactory<ts.SourceFile>; | ||
/** | ||
* Process a `ts.SourceFile` and replace any `ts.ImportDeclaration`s. | ||
*/ | ||
private transformSourceFile; | ||
} |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/emitter" /> | ||
/** | ||
@@ -66,3 +65,3 @@ * @license | ||
*/ | ||
export declare type ImportedFile = ts.SourceFile | 'unknown' | null; | ||
export type ImportedFile = ts.SourceFile | 'unknown' | null; | ||
export declare const enum ReferenceEmitKind { | ||
@@ -108,3 +107,3 @@ Success = 0, | ||
} | ||
export declare type ReferenceEmitResult = EmittedReference | FailedEmitResult; | ||
export type ReferenceEmitResult = EmittedReference | FailedEmitResult; | ||
/** | ||
@@ -111,0 +110,0 @@ * Verifies that a reference was emitted successfully, or raises a `FatalDiagnosticError` otherwise. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/find_export" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ReflectionHost } from '../../reflection'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/reexport" /> | ||
export interface Reexport { | ||
@@ -11,0 +10,0 @@ symbolName: string; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/references" /> | ||
import { Expression } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/imports/src/resolver" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/api" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental" /> | ||
export { IncrementalCompilation } from './src/incremental'; | ||
@@ -11,0 +10,0 @@ export { NOOP_INCREMENTAL_BUILD } from './src/noop'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/semantic_graph" /> | ||
export { SemanticReference, SemanticSymbol } from './src/api'; | ||
@@ -11,0 +10,0 @@ export { SemanticDepGraph, SemanticDepGraphUpdater } from './src/graph'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api" /> | ||
import { AbsoluteFsPath } from '../../../file_system'; | ||
@@ -3,0 +2,0 @@ import { ClassDeclaration } from '../../../reflection'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph" /> | ||
import { Expression } from '@angular/compiler'; | ||
@@ -33,3 +32,3 @@ import { AbsoluteFsPath } from '../../../file_system'; | ||
readonly files: Map<AbsoluteFsPath, Map<string, SemanticSymbol>>; | ||
readonly symbolByDecl: Map<ClassDeclaration<import("@angular/compiler-cli/src/ngtsc/reflection").DeclarationNode>, SemanticSymbol>; | ||
readonly symbolByDecl: Map<ClassDeclaration, SemanticSymbol>; | ||
/** | ||
@@ -36,0 +35,0 @@ * Registers a symbol in the graph. The symbol is given a unique identifier if possible, such that |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters" /> | ||
import { ClassDeclaration } from '../../../reflection'; | ||
@@ -3,0 +2,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/src/dependency_tracking" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/src/incremental" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/src/noop" /> | ||
import { IncrementalBuild } from '../api'; | ||
export declare const NOOP_INCREMENTAL_BUILD: IncrementalBuild<any, any>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/src/state" /> | ||
import ts from 'typescript'; | ||
@@ -99,2 +98,2 @@ import { AbsoluteFsPath } from '../../file_system'; | ||
*/ | ||
export declare type IncrementalState = AnalyzedIncrementalState | DeltaIncrementalState | FreshIncrementalState; | ||
export type IncrementalState = AnalyzedIncrementalState | DeltaIncrementalState | FreshIncrementalState; |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/incremental/src/strategy" /> | ||
import ts from 'typescript'; | ||
import { IncrementalState } from './state'; | ||
/** | ||
* Strategy used to manage the association between a `ts.Program` and the `IncrementalDriver` which | ||
* Strategy used to manage the association between a `ts.Program` and the `IncrementalState` which | ||
* represents the reusable Angular part of its compilation. | ||
@@ -18,7 +17,7 @@ */ | ||
/** | ||
* Determine the Angular `IncrementalDriver` for the given `ts.Program`, if one is available. | ||
* Determine the Angular `IncrementalState` for the given `ts.Program`, if one is available. | ||
*/ | ||
getIncrementalState(program: ts.Program): IncrementalState | null; | ||
/** | ||
* Associate the given `IncrementalDriver` with the given `ts.Program` and make it available to | ||
* Associate the given `IncrementalState` with the given `ts.Program` and make it available to | ||
* future compilations. | ||
@@ -43,3 +42,3 @@ */ | ||
/** | ||
* Tracks an `IncrementalDriver` within the strategy itself. | ||
* Tracks an `IncrementalState` within the strategy itself. | ||
*/ | ||
@@ -54,4 +53,4 @@ export declare class TrackedIncrementalBuildStrategy implements IncrementalBuildStrategy { | ||
/** | ||
* Manages the `IncrementalDriver` associated with a `ts.Program` by monkey-patching it onto the | ||
* program under `SYM_INCREMENTAL_DRIVER`. | ||
* Manages the `IncrementalState` associated with a `ts.Program` by monkey-patching it onto the | ||
* program under `SYM_INCREMENTAL_STATE`. | ||
*/ | ||
@@ -58,0 +57,0 @@ export declare class PatchedProgramIncrementalBuildStrategy implements IncrementalBuildStrategy { |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/indexer" /> | ||
export * from './src/api'; | ||
export { IndexingContext } from './src/context'; | ||
export { generateAnalysis } from './src/transform'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/indexer/src/api" /> | ||
import { ParseSourceFile } from '@angular/compiler'; | ||
@@ -102,3 +101,3 @@ import { ClassDeclaration, DeclarationNode } from '../../reflection'; | ||
*/ | ||
export declare type TopLevelIdentifier = PropertyIdentifier | ElementIdentifier | TemplateNodeIdentifier | ReferenceIdentifier | VariableIdentifier | MethodIdentifier; | ||
export type TopLevelIdentifier = PropertyIdentifier | ElementIdentifier | TemplateNodeIdentifier | ReferenceIdentifier | VariableIdentifier | MethodIdentifier; | ||
/** | ||
@@ -105,0 +104,0 @@ * Describes the absolute byte offsets of a text anchor in a source code. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/indexer/src/context" /> | ||
import { BoundTarget, DirectiveMeta, ParseSourceFile } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../imports'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/indexer/src/template" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/indexer/src/transform" /> | ||
import { DeclarationNode } from '../../reflection'; | ||
@@ -11,0 +10,0 @@ import { IndexedComponent } from './api'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/logging" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/logging/src/console_logger" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/logging/src/logger" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Implement this interface if you want to provide different logging |
@@ -8,9 +8,10 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata" /> | ||
export * from './src/api'; | ||
export { DtsMetadataReader } from './src/dts'; | ||
export { flattenInheritedDirectiveMetadata } from './src/inheritance'; | ||
export { CompoundMetadataRegistry, LocalMetadataRegistry, InjectableClassRegistry } from './src/registry'; | ||
export { CompoundMetadataRegistry, LocalMetadataRegistry } from './src/registry'; | ||
export { ResourceRegistry, Resource, ComponentResources, isExternalResource, ExternalResource } from './src/resource_registry'; | ||
export { extractDirectiveTypeCheckMeta, CompoundMetadataReader } from './src/util'; | ||
export { extractDirectiveTypeCheckMeta, hasInjectableFields, CompoundMetadataReader } from './src/util'; | ||
export { BindingPropertyName, ClassPropertyMapping, ClassPropertyName, InputOrOutput } from './src/property_mapping'; | ||
export { ExportedProviderStatusResolver } from './src/providers'; | ||
export { HostDirectivesResolver } from './src/host_directives_resolver'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/api" /> | ||
import { DirectiveMeta as T2DirectiveMeta, SchemaMetadata } from '@angular/compiler'; | ||
@@ -14,3 +13,3 @@ import ts from 'typescript'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
import { ClassPropertyMapping, ClassPropertyName } from './property_mapping'; | ||
import { ClassPropertyMapping, ClassPropertyName, InputOrOutput } from './property_mapping'; | ||
/** | ||
@@ -53,2 +52,9 @@ * Metadata collected for an `NgModule`. | ||
decorator: ts.Decorator | null; | ||
/** | ||
* Whether this NgModule may declare providers. | ||
* | ||
* If the compiler does not know if the NgModule may declare providers, this will be `true` (for | ||
* example, NgModules declared outside the current compilation are assumed to declare providers). | ||
*/ | ||
mayDeclareProviders: boolean; | ||
} | ||
@@ -103,2 +109,21 @@ /** | ||
/** | ||
* Possible ways that a directive can be matched. | ||
*/ | ||
export declare enum MatchSource { | ||
/** The directive was matched by its selector. */ | ||
Selector = 0, | ||
/** The directive was applied as a host directive. */ | ||
HostDirective = 1 | ||
} | ||
/** Metadata for a single input mapping. */ | ||
export type InputMapping = InputOrOutput & { | ||
required: boolean; | ||
transform: InputTransform | null; | ||
}; | ||
/** Metadata for an input's transform function. */ | ||
export interface InputTransform { | ||
node: ts.Node; | ||
type: Reference<ts.TypeNode>; | ||
} | ||
/** | ||
* Metadata collected for a directive within an NgModule's scope. | ||
@@ -108,2 +133,4 @@ */ | ||
kind: MetaKind.Directive; | ||
/** Way in which the directive was matched. */ | ||
matchSource: MatchSource; | ||
ref: Reference<ClassDeclaration>; | ||
@@ -118,3 +145,3 @@ /** | ||
*/ | ||
inputs: ClassPropertyMapping; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
/** | ||
@@ -145,2 +172,6 @@ * A mapping of output field names to the property names. | ||
/** | ||
* Whether the directive is a signal entity. | ||
*/ | ||
isSignal: boolean; | ||
/** | ||
* For standalone components, the list of imported types. | ||
@@ -159,3 +190,24 @@ */ | ||
decorator: ts.Decorator | null; | ||
/** Additional directives applied to the directive host. */ | ||
hostDirectives: HostDirectiveMeta[] | null; | ||
/** | ||
* Whether the directive should be assumed to export providers if imported as a standalone type. | ||
*/ | ||
assumedToExportProviders: boolean; | ||
} | ||
/** Metadata collected about an additional directive that is being applied to a directive host. */ | ||
export interface HostDirectiveMeta { | ||
/** Reference to the host directive class. */ | ||
directive: Reference<ClassDeclaration>; | ||
/** Whether the reference to the host directive is a forward reference. */ | ||
isForwardReference: boolean; | ||
/** Inputs from the host directive that have been exposed. */ | ||
inputs: { | ||
[publicName: string]: string; | ||
} | null; | ||
/** Outputs from the host directive that have been exposed. */ | ||
outputs: { | ||
[publicName: string]: string; | ||
} | null; | ||
} | ||
/** | ||
@@ -199,2 +251,14 @@ * Metadata that describes a template guard for one of the directive's inputs. | ||
/** | ||
* A MetadataReader which also allows access to the set of all known trait classes. | ||
*/ | ||
export interface MetadataReaderWithIndex extends MetadataReader { | ||
getKnown(kind: MetaKind): Array<ClassDeclaration>; | ||
} | ||
/** | ||
* An NgModuleIndex allows access to information about traits exported by NgModules. | ||
*/ | ||
export interface NgModuleIndex { | ||
getNgModulesExporting(directiveOrPipe: ClassDeclaration): Array<Reference<ClassDeclaration>>; | ||
} | ||
/** | ||
* Registers new metadata for directives, pipes, and modules. | ||
@@ -201,0 +265,0 @@ */ |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/dts" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../imports'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/inheritance" /> | ||
import { Reference } from '../../imports'; | ||
@@ -21,2 +20,2 @@ import { ClassDeclaration } from '../../reflection'; | ||
*/ | ||
export declare function flattenInheritedDirectiveMetadata(reader: MetadataReader, dir: Reference<ClassDeclaration>): DirectiveMeta; | ||
export declare function flattenInheritedDirectiveMetadata(reader: MetadataReader, dir: Reference<ClassDeclaration>): DirectiveMeta | null; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/property_mapping" /> | ||
import { InputOutputPropertySet } from '@angular/compiler'; | ||
@@ -16,3 +15,3 @@ /** | ||
*/ | ||
export declare type ClassPropertyName = string; | ||
export type ClassPropertyName = string; | ||
/** | ||
@@ -23,3 +22,3 @@ * The name by which an input or output of a directive or component is bound in an Angular template. | ||
*/ | ||
export declare type BindingPropertyName = string; | ||
export type BindingPropertyName = string; | ||
/** | ||
@@ -51,3 +50,3 @@ * An input or output of a directive that has both a named JavaScript class property on a component | ||
*/ | ||
export declare class ClassPropertyMapping implements InputOutputPropertySet { | ||
export declare class ClassPropertyMapping<T extends InputOrOutput = InputOrOutput> implements InputOutputPropertySet { | ||
/** | ||
@@ -65,3 +64,3 @@ * Mapping from class property names to the single `InputOrOutput` for that class property. | ||
*/ | ||
static empty(): ClassPropertyMapping; | ||
static empty<T extends InputOrOutput>(): ClassPropertyMapping<T>; | ||
/** | ||
@@ -72,5 +71,5 @@ * Construct a `ClassPropertyMapping` from a primitive JS object which maps class property names | ||
*/ | ||
static fromMappedObject(obj: { | ||
[classPropertyName: string]: BindingPropertyName | [ClassPropertyName, BindingPropertyName]; | ||
}): ClassPropertyMapping; | ||
static fromMappedObject<T extends InputOrOutput>(obj: { | ||
[classPropertyName: string]: BindingPropertyName | [ClassPropertyName, BindingPropertyName] | T; | ||
}): ClassPropertyMapping<T>; | ||
/** | ||
@@ -80,3 +79,3 @@ * Merge two mappings into one, with class properties from `b` taking precedence over class | ||
*/ | ||
static merge(a: ClassPropertyMapping, b: ClassPropertyMapping): ClassPropertyMapping; | ||
static merge<T extends InputOrOutput>(a: ClassPropertyMapping<T>, b: ClassPropertyMapping<T>): ClassPropertyMapping<T>; | ||
/** | ||
@@ -97,7 +96,7 @@ * All class property names mapped in this mapping. | ||
*/ | ||
getByBindingPropertyName(propertyName: string): ReadonlyArray<InputOrOutput> | null; | ||
getByBindingPropertyName(propertyName: string): ReadonlyArray<T> | null; | ||
/** | ||
* Lookup the `InputOrOutput` associated with a `classPropertyName`. | ||
*/ | ||
getByClassPropertyName(classPropertyName: string): InputOrOutput | null; | ||
getByClassPropertyName(classPropertyName: string): T | null; | ||
/** | ||
@@ -116,5 +115,6 @@ * Convert this mapping to a primitive JS object which maps each class property directly to the | ||
* This object format is used when mappings are serialized (for example into .d.ts files). | ||
* @param transform Function used to transform the values of the generated map. | ||
*/ | ||
toJointMappedObject(): { | ||
[classPropertyName: string]: BindingPropertyName | [BindingPropertyName, ClassPropertyName]; | ||
toJointMappedObject<O = T>(transform: (value: T) => O): { | ||
[classPropertyName: string]: O; | ||
}; | ||
@@ -125,3 +125,3 @@ /** | ||
*/ | ||
[Symbol.iterator](): IterableIterator<[ClassPropertyName, BindingPropertyName]>; | ||
[Symbol.iterator](): IterableIterator<T>; | ||
} |
@@ -8,6 +8,5 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/registry" /> | ||
import { Reference } from '../../imports'; | ||
import { ClassDeclaration, ReflectionHost } from '../../reflection'; | ||
import { DirectiveMeta, MetadataReader, MetadataRegistry, NgModuleMeta, PipeMeta } from './api'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
import { DirectiveMeta, MetadataReaderWithIndex, MetadataRegistry, MetaKind, NgModuleMeta, PipeMeta } from './api'; | ||
/** | ||
@@ -17,3 +16,3 @@ * A registry of directive, pipe, and module metadata for types defined in the current compilation | ||
*/ | ||
export declare class LocalMetadataRegistry implements MetadataRegistry, MetadataReader { | ||
export declare class LocalMetadataRegistry implements MetadataRegistry, MetadataReaderWithIndex { | ||
private directives; | ||
@@ -28,2 +27,3 @@ private ngModules; | ||
registerPipeMetadata(meta: PipeMeta): void; | ||
getKnown(kind: MetaKind): Array<ClassDeclaration>; | ||
} | ||
@@ -41,12 +41,1 @@ /** | ||
} | ||
/** | ||
* Registry that keeps track of classes that can be constructed via dependency injection (e.g. | ||
* injectables, directives, pipes). | ||
*/ | ||
export declare class InjectableClassRegistry { | ||
private host; | ||
private classes; | ||
constructor(host: ReflectionHost); | ||
registerInjectable(declaration: ClassDeclaration): void; | ||
isInjectable(declaration: ClassDeclaration): boolean; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/resource_registry" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,13 +8,13 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/metadata/src/util" /> | ||
import ts from 'typescript'; | ||
import { OwningModule, Reference } from '../../imports'; | ||
import { ClassDeclaration, ReflectionHost } from '../../reflection'; | ||
import { DirectiveMeta, DirectiveTypeCheckMeta, MetadataReader, NgModuleMeta, PipeMeta } from './api'; | ||
import { DirectiveMeta, DirectiveTypeCheckMeta, InputMapping, MetadataReader, NgModuleMeta, PipeMeta } from './api'; | ||
import { ClassPropertyMapping } from './property_mapping'; | ||
export declare function extractReferencesFromType(checker: ts.TypeChecker, def: ts.TypeNode, bestGuessOwningModule: OwningModule | null): Reference<ClassDeclaration>[]; | ||
export declare function extraReferenceFromTypeQuery(checker: ts.TypeChecker, typeNode: ts.TypeQueryNode, origin: ts.TypeNode, bestGuessOwningModule: OwningModule | null): Reference<ClassDeclaration<ts.ClassDeclaration>>; | ||
export declare function readBooleanType(type: ts.TypeNode): boolean | null; | ||
export declare function readStringType(type: ts.TypeNode): string | null; | ||
export declare function readStringMapType(type: ts.TypeNode): { | ||
[key: string]: string; | ||
export declare function readMapType<T>(type: ts.TypeNode, valueTransform: (type: ts.TypeNode) => T | null): { | ||
[key: string]: T; | ||
}; | ||
@@ -27,3 +27,3 @@ export declare function readStringArrayType(type: ts.TypeNode): string[]; | ||
*/ | ||
export declare function extractDirectiveTypeCheckMeta(node: ClassDeclaration, inputs: ClassPropertyMapping, reflector: ReflectionHost): DirectiveTypeCheckMeta; | ||
export declare function extractDirectiveTypeCheckMeta(node: ClassDeclaration, inputs: ClassPropertyMapping<InputMapping>, reflector: ReflectionHost): DirectiveTypeCheckMeta; | ||
/** | ||
@@ -30,0 +30,0 @@ * A `MetadataReader` that reads from an ordered set of child readers until it obtains the requested |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator" /> | ||
export { describeResolvedType, traceDynamicValue } from './src/diagnostics'; | ||
@@ -11,0 +10,0 @@ export { DynamicValue } from './src/dynamic'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/builtin" /> | ||
import ts from 'typescript'; | ||
@@ -27,4 +26,1 @@ import { KnownFn, ResolvedValue, ResolvedValueArray } from './result'; | ||
} | ||
export declare class ObjectAssignBuiltinFn extends KnownFn { | ||
evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { DynamicValue } from './dynamic'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../imports'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/interface" /> | ||
import ts from 'typescript'; | ||
@@ -16,3 +15,3 @@ import { Reference } from '../../imports'; | ||
import { ResolvedValue } from './result'; | ||
export declare type ForeignFunctionResolver = (fn: Reference<ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression>, callExpr: ts.CallExpression, resolve: (expr: ts.Expression) => ResolvedValue, unresolvable: DynamicValue) => ResolvedValue; | ||
export type ForeignFunctionResolver = (fn: Reference<ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression>, callExpr: ts.CallExpression, resolve: (expr: ts.Expression) => ResolvedValue, unresolvable: DynamicValue) => ResolvedValue; | ||
export declare class PartialEvaluator { | ||
@@ -19,0 +18,0 @@ private host; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter" /> | ||
import ts from 'typescript'; | ||
@@ -19,3 +18,3 @@ import { DependencyTracker } from '../../incremental/api'; | ||
*/ | ||
declare type Scope = Map<ts.ParameterDeclaration, ResolvedValue>; | ||
type Scope = Map<ts.ParameterDeclaration, ResolvedValue>; | ||
interface Context { | ||
@@ -52,3 +51,2 @@ originatingFile: ts.SourceFile; | ||
private visitSourceFile; | ||
private visitAmbiguousDeclaration; | ||
private accessHelper; | ||
@@ -72,7 +70,7 @@ private visitCallExpression; | ||
private stringNameFromPropertyName; | ||
private getResolvedEnum; | ||
private getReference; | ||
private visitType; | ||
private visitTupleType; | ||
private visitTypeQuery; | ||
} | ||
export {}; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/result" /> | ||
import ts from 'typescript'; | ||
@@ -22,3 +21,3 @@ import { Reference } from '../../imports'; | ||
*/ | ||
export declare type ResolvedValue = number | boolean | string | null | undefined | Reference | EnumValue | ResolvedValueArray | ResolvedValueMap | ResolvedModule | KnownFn | SyntheticValue<unknown> | DynamicValue<unknown>; | ||
export type ResolvedValue = number | boolean | string | null | undefined | Reference | EnumValue | ResolvedValueArray | ResolvedValueMap | ResolvedModule | KnownFn | SyntheticValue<unknown> | DynamicValue<unknown>; | ||
/** | ||
@@ -25,0 +24,0 @@ * An array of `ResolvedValue`s. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * A value produced which originated in a `ForeignFunctionResolver` and doesn't come from the |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/perf" /> | ||
export * from './src/api'; | ||
export { NOOP_PERF_RECORDER } from './src/noop'; | ||
export { ActivePerfRecorder, DelegatingPerfRecorder } from './src/recorder'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/perf/src/api" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * A phase of compilation for which time is tracked in a distinct bucket. |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/perf/src/clock" /> | ||
export declare type HrTime = [number, number]; | ||
export type HrTime = [number, number]; | ||
export declare function mark(): HrTime; | ||
export declare function timeSinceInMicros(mark: HrTime): number; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/perf/src/noop" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/perf/src/recorder" /> | ||
import { PerfCheckpoint, PerfEvent, PerfPhase, PerfRecorder } from './api'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/program_driver" /> | ||
export * from './src/api'; | ||
export { TsCreateProgramDriver } from './src/ts_create_program_driver'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/program_driver/src/api" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver" /> | ||
import ts from 'typescript'; | ||
@@ -23,4 +22,2 @@ import { AbsoluteFsPath } from '../../file_system'; | ||
protected delegate: ts.CompilerHost; | ||
constructor(delegate: ts.CompilerHost); | ||
private delegateMethod; | ||
createHash: ((data: string) => string) | undefined; | ||
@@ -42,6 +39,11 @@ directoryExists: ((directoryName: string) => boolean) | undefined; | ||
resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | undefined; | ||
resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined; | ||
resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ResolutionMode) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined; | ||
trace: ((s: string) => void) | undefined; | ||
useCaseSensitiveFileNames: () => boolean; | ||
getModuleResolutionCache: (() => ts.ModuleResolutionCache | undefined) | undefined; | ||
hasInvalidatedResolutions: ((filePath: ts.Path) => boolean) | undefined; | ||
resolveModuleNameLiterals: ((moduleLiterals: readonly ts.StringLiteralLike[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile: ts.SourceFile, reusedNames: readonly ts.StringLiteralLike[] | undefined) => readonly ts.ResolvedModuleWithFailedLookupLocations[]) | undefined; | ||
resolveTypeReferenceDirectiveReferences: (<T extends string | ts.FileReference>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile: ts.SourceFile | undefined, reusedNames: readonly T[] | undefined) => readonly ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]) | undefined; | ||
constructor(delegate: ts.CompilerHost); | ||
private delegateMethod; | ||
} | ||
@@ -48,0 +50,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/program" /> | ||
import ts from 'typescript'; | ||
@@ -49,12 +48,5 @@ import * as api from '../transformers/api'; | ||
private emitXi18n; | ||
emit(opts?: { | ||
emitFlags?: api.EmitFlags | undefined; | ||
forceEmit?: boolean; | ||
cancellationToken?: ts.CancellationToken | undefined; | ||
customTransformers?: api.CustomTransformers | undefined; | ||
emitCallback?: api.TsEmitCallback | undefined; | ||
mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback | undefined; | ||
} | undefined): ts.EmitResult; | ||
emit<CbEmitRes extends ts.EmitResult>(opts?: api.EmitOptions<CbEmitRes> | undefined): ts.EmitResult; | ||
getIndexedComponents(): Map<DeclarationNode, IndexedComponent>; | ||
getEmittedSourceFiles(): Map<string, ts.SourceFile>; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection" /> | ||
export * from './src/host'; | ||
@@ -11,0 +10,0 @@ export { typeNodeToValueExpr } from './src/type_to_value'; |
@@ -8,10 +8,7 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/host" /> | ||
import ts from 'typescript'; | ||
/** | ||
* Metadata extracted from an instance of a decorator on another declaration, or synthesized from | ||
* other information about a class. | ||
* Metadata extracted from an instance of a decorator on another declaration. | ||
*/ | ||
export declare type Decorator = ConcreteDecorator | SyntheticDecorator; | ||
export interface BaseDecorator { | ||
export interface Decorator { | ||
/** | ||
@@ -27,13 +24,15 @@ * Name by which the decorator was invoked in the user's code. | ||
*/ | ||
identifier: DecoratorIdentifier | null; | ||
identifier: DecoratorIdentifier; | ||
/** | ||
* `Import` by which the decorator was brought into the module in which it was invoked, or `null` | ||
* if the decorator was declared in the same module and not imported. | ||
* | ||
* Note: this field is declared using computed property syntax to work around a clang-format bug | ||
* that resulted in inconsistent indentation of this comment block. | ||
*/ | ||
import: Import | null; | ||
['import']: Import | null; | ||
/** | ||
* TypeScript reference to the decorator itself, or `null` if the decorator is synthesized (e.g. | ||
* in ngcc). | ||
* TypeScript reference to the decorator itself. | ||
*/ | ||
node: ts.Node | null; | ||
node: ts.Node; | ||
/** | ||
@@ -46,32 +45,7 @@ * Arguments of the invocation of the decorator, if the decorator is invoked, or `null` | ||
/** | ||
* Metadata extracted from an instance of a decorator on another declaration, which was actually | ||
* present in a file. | ||
* | ||
* Concrete decorators always have an `identifier` and a `node`. | ||
*/ | ||
export interface ConcreteDecorator extends BaseDecorator { | ||
identifier: DecoratorIdentifier; | ||
node: ts.Node; | ||
} | ||
/** | ||
* Synthetic decorators never have an `identifier` or a `node`, but know the node for which they | ||
* were synthesized. | ||
*/ | ||
export interface SyntheticDecorator extends BaseDecorator { | ||
identifier: null; | ||
node: null; | ||
/** | ||
* The `ts.Node` for which this decorator was created. | ||
*/ | ||
synthesizedFor: ts.Node; | ||
} | ||
export declare const Decorator: { | ||
nodeForError: (decorator: Decorator) => ts.Node; | ||
}; | ||
/** | ||
* A decorator is identified by either a simple identifier (e.g. `Decorator`) or, in some cases, | ||
* a namespaced property access (e.g. `core.Decorator`). | ||
*/ | ||
export declare type DecoratorIdentifier = ts.Identifier | NamespacedIdentifier; | ||
export declare type NamespacedIdentifier = ts.PropertyAccessExpression & { | ||
export type DecoratorIdentifier = ts.Identifier | NamespacedIdentifier; | ||
export type NamespacedIdentifier = ts.PropertyAccessExpression & { | ||
expression: ts.Identifier; | ||
@@ -96,3 +70,3 @@ name: ts.Identifier; | ||
*/ | ||
export declare type ClassDeclaration<T extends DeclarationNode = DeclarationNode> = T & { | ||
export type ClassDeclaration<T extends DeclarationNode = DeclarationNode> = T & { | ||
name: ts.Identifier; | ||
@@ -314,3 +288,3 @@ }; | ||
*/ | ||
export declare type UnavailableValue = UnsupportedType | NoValueDeclaration | TypeOnlyImport | NamespaceImport | UnknownReference | MissingType; | ||
export type UnavailableValue = UnsupportedType | NoValueDeclaration | TypeOnlyImport | NamespaceImport | UnknownReference | MissingType; | ||
/** | ||
@@ -325,3 +299,3 @@ * A reference to a value that originated from a type position. | ||
*/ | ||
export declare type TypeValueReference = LocalTypeValueReference | ImportedTypeValueReference | UnavailableTypeValueReference; | ||
export type TypeValueReference = LocalTypeValueReference | ImportedTypeValueReference | UnavailableTypeValueReference; | ||
/** | ||
@@ -377,3 +351,3 @@ * A parameter to a constructor. | ||
*/ | ||
node: ts.MethodDeclaration | ts.FunctionDeclaration | ts.FunctionExpression | ts.VariableDeclaration; | ||
node: ts.MethodDeclaration | ts.FunctionDeclaration | ts.FunctionExpression | ts.VariableDeclaration | ts.ArrowFunction; | ||
/** | ||
@@ -392,31 +366,10 @@ * Statements of the function body, if a body is present, or null if no body is present or the | ||
parameters: Parameter[]; | ||
} | ||
/** | ||
* Possible declarations of known values, such as built-in objects/functions or TypeScript helpers. | ||
*/ | ||
export declare enum KnownDeclaration { | ||
/** | ||
* Indicates the JavaScript global `Object` class. | ||
* Generic type parameters of the function. | ||
*/ | ||
JsGlobalObject = 0, | ||
typeParameters: ts.TypeParameterDeclaration[] | null; | ||
/** | ||
* Indicates the `__assign` TypeScript helper function. | ||
* Number of known signatures of the function. | ||
*/ | ||
TsHelperAssign = 1, | ||
/** | ||
* Indicates the `__spread` TypeScript helper function. | ||
*/ | ||
TsHelperSpread = 2, | ||
/** | ||
* Indicates the `__spreadArrays` TypeScript helper function. | ||
*/ | ||
TsHelperSpreadArrays = 3, | ||
/** | ||
* Indicates the `__spreadArray` TypeScript helper function. | ||
*/ | ||
TsHelperSpreadArray = 4, | ||
/** | ||
* Indicates the `__read` TypeScript helper function. | ||
*/ | ||
TsHelperRead = 5 | ||
signatureCount: number; | ||
} | ||
@@ -439,2 +392,6 @@ /** | ||
initializer: ts.Expression | null; | ||
/** | ||
* Type of the parameter. | ||
*/ | ||
type: ts.TypeNode | null; | ||
} | ||
@@ -456,47 +413,17 @@ /** | ||
from: string; | ||
} | ||
/** | ||
* A single enum member extracted from JavaScript when no `ts.EnumDeclaration` is available. | ||
*/ | ||
export interface EnumMember { | ||
/** | ||
* The name of the enum member. | ||
* TypeScript node that represents this import. | ||
*/ | ||
name: ts.PropertyName; | ||
/** | ||
* The initializer expression of the enum member. Unlike in TypeScript, this is always available | ||
* in emitted JavaScript. | ||
*/ | ||
initializer: ts.Expression; | ||
node: ts.ImportDeclaration; | ||
} | ||
/** | ||
* A type that is used to identify a declaration. | ||
* | ||
* Declarations are normally `ts.Declaration` types such as variable declarations, class | ||
* declarations, function declarations etc. | ||
* But in some cases there is no `ts.Declaration` that can be used for a declaration, such | ||
* as when they are declared inline as part of an exported expression. Then we must use a | ||
* `ts.Expression` as the declaration. | ||
* An example of this is `exports.someVar = 42` where the declaration expression would be | ||
* `exports.someVar`. | ||
*/ | ||
export declare type DeclarationNode = ts.Declaration | ts.Expression; | ||
export type DeclarationNode = ts.Declaration; | ||
/** | ||
* The type of a Declaration - whether its node is concrete (ts.Declaration) or inline | ||
* (ts.Expression). See `ConcreteDeclaration`, `InlineDeclaration` and `DeclarationNode` for more | ||
* information about this. | ||
* The declaration of a symbol, along with information about how it was imported into the | ||
* application. | ||
*/ | ||
export declare const enum DeclarationKind { | ||
Concrete = 0, | ||
Inline = 1 | ||
} | ||
/** | ||
* Base type for all `Declaration`s. | ||
*/ | ||
export interface BaseDeclaration<T extends DeclarationNode> { | ||
export interface Declaration<T extends ts.Declaration = ts.Declaration> { | ||
/** | ||
* The type of the underlying `node`. | ||
*/ | ||
kind: DeclarationKind; | ||
/** | ||
* The absolute module path from which the symbol was imported into the application, if the symbol | ||
@@ -511,50 +438,4 @@ * was imported via an absolute module (even through a chain of re-exports). If the symbol is part | ||
node: T; | ||
/** | ||
* If set, describes the type of the known declaration this declaration resolves to. | ||
*/ | ||
known: KnownDeclaration | null; | ||
} | ||
/** | ||
* Returns true if the `decl` is a `ConcreteDeclaration` (ie. that its `node` property is a | ||
* `ts.Declaration`). | ||
*/ | ||
export declare function isConcreteDeclaration(decl: Declaration): decl is ConcreteDeclaration; | ||
export interface ConcreteDeclaration<T extends ts.Declaration = ts.Declaration> extends BaseDeclaration<T> { | ||
kind: DeclarationKind.Concrete; | ||
/** | ||
* Optionally represents a special identity of the declaration, or `null` if the declaration | ||
* does not have a special identity. | ||
*/ | ||
identity: SpecialDeclarationIdentity | null; | ||
} | ||
export declare type SpecialDeclarationIdentity = DownleveledEnum; | ||
export declare const enum SpecialDeclarationKind { | ||
DownleveledEnum = 0 | ||
} | ||
/** | ||
* A special declaration identity that represents an enum. This is used in downleveled forms where | ||
* a `ts.EnumDeclaration` is emitted in an alternative form, e.g. an IIFE call that declares all | ||
* members. | ||
*/ | ||
export interface DownleveledEnum { | ||
kind: SpecialDeclarationKind.DownleveledEnum; | ||
enumMembers: EnumMember[]; | ||
} | ||
/** | ||
* A declaration that does not have an associated TypeScript `ts.Declaration`. | ||
* | ||
* This can occur in some downlevelings when an `export const VAR = ...;` (a `ts.Declaration`) is | ||
* transpiled to an assignment statement (e.g. `exports.VAR = ...;`). There is no `ts.Declaration` | ||
* associated with `VAR` in that case, only an expression. | ||
*/ | ||
export interface InlineDeclaration extends BaseDeclaration<Exclude<DeclarationNode, ts.Declaration>> { | ||
kind: DeclarationKind.Inline; | ||
implementation?: DeclarationNode; | ||
} | ||
/** | ||
* The declaration of a symbol, along with information about how it was imported into the | ||
* application. | ||
*/ | ||
export declare type Declaration<T extends ts.Declaration = ts.Declaration> = ConcreteDeclaration<T> | InlineDeclaration; | ||
/** | ||
* Abstracts reflection operations on a TypeScript AST. | ||
@@ -726,33 +607,2 @@ * | ||
/** | ||
* Take an exported declaration (maybe a class down-leveled to a variable) and look up the | ||
* declaration of its type in a separate .d.ts tree. | ||
* | ||
* This function is allowed to return `null` if the current compilation unit does not have a | ||
* separate .d.ts tree. When compiling TypeScript code this is always the case, since .d.ts files | ||
* are produced only during the emit of such a compilation. When compiling .js code, however, | ||
* there is frequently a parallel .d.ts tree which this method exposes. | ||
* | ||
* Note that the `ts.Declaration` returned from this function may not be from the same | ||
* `ts.Program` as the input declaration. | ||
*/ | ||
getDtsDeclaration(declaration: DeclarationNode): ts.Declaration | null; | ||
/** | ||
* Get a `ts.Identifier` for a given `ClassDeclaration` which can be used to refer to the class | ||
* within its definition (such as in static fields). | ||
* | ||
* This can differ from `clazz.name` when ngcc runs over ES5 code, since the class may have a | ||
* different name within its IIFE wrapper than it does externally. | ||
*/ | ||
getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier; | ||
/** | ||
* Get a `ts.Identifier` for a given `ClassDeclaration` which can be used to refer to the class | ||
* from statements that are "adjacent", and conceptually tightly bound, to the class but not | ||
* actually inside it. | ||
* | ||
* Similar to `getInternalNameOfClass()`, this name can differ from `clazz.name` when ngcc runs | ||
* over ES5 code, since these "adjacent" statements need to exist in the IIFE where the class may | ||
* have a different name than it does externally. | ||
*/ | ||
getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier; | ||
/** | ||
* Returns `true` if a declaration is exported from the module in which it's defined. | ||
@@ -759,0 +609,0 @@ * |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/type_to_value" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { TypeValueReference } from './host'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/typescript" /> | ||
import ts from 'typescript'; | ||
@@ -30,5 +29,2 @@ import { ClassDeclaration, ClassMember, CtorParameter, Declaration, DeclarationNode, Decorator, FunctionDefinition, Import, ReflectionHost } from './host'; | ||
getVariableValue(declaration: ts.VariableDeclaration): ts.Expression | null; | ||
getDtsDeclaration(_: ClassDeclaration): ts.Declaration | null; | ||
getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier; | ||
getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier; | ||
isStaticallyExported(decl: ts.Node): boolean; | ||
@@ -78,1 +74,6 @@ protected getDirectImportOfIdentifier(id: ts.Identifier): Import | null; | ||
export declare function reflectObjectLiteral(node: ts.ObjectLiteralExpression): Map<string, ts.Expression>; | ||
/** | ||
* Return the ImportDeclaration for the given `node` if it is either an `ImportSpecifier` or a | ||
* `NamespaceImport`. If not return `null`. | ||
*/ | ||
export declare function getContainingImportDeclaration(node: ts.Node): ts.ImportDeclaration | null; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/reflection/src/util" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ClassDeclaration } from './host'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/resource" /> | ||
export { AdapterResourceLoader } from './src/loader'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/resource/src/loader" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ResourceLoader, ResourceLoaderContext } from '../../annotations'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope" /> | ||
export { ComponentScopeKind, ComponentScopeReader, ExportScope, LocalModuleScope, ScopeData, StandaloneScope } from './src/api'; | ||
@@ -11,0 +10,0 @@ export { CompoundComponentScopeReader } from './src/component_scope'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/api" /> | ||
import { SchemaMetadata } from '@angular/compiler'; | ||
@@ -67,3 +66,3 @@ import { Reexport, Reference } from '../../imports'; | ||
} | ||
export declare type ComponentScope = LocalModuleScope | StandaloneScope; | ||
export type ComponentScope = LocalModuleScope | StandaloneScope; | ||
/** | ||
@@ -70,0 +69,0 @@ * Read information about the compilation scope of components. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/component_scope" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/dependency" /> | ||
import { AliasingHost, Reference } from '../../imports'; | ||
@@ -11,0 +10,0 @@ import { MetadataReader } from '../../metadata'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/local" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AliasingHost, Reference, ReferenceEmitter } from '../../imports'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/standalone" /> | ||
import { MetadataReader } from '../../metadata'; | ||
@@ -11,0 +10,0 @@ import { ClassDeclaration } from '../../reflection'; |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/typecheck" /> | ||
import { SchemaMetadata, SelectorMatcher } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Reference } from '../../imports'; | ||
import { DirectiveMeta, MetadataReader } from '../../metadata'; | ||
import { DirectiveMeta, HostDirectivesResolver, MetadataReader } from '../../metadata'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
@@ -24,3 +23,3 @@ import { ComponentScopeReader } from './api'; | ||
*/ | ||
matcher: SelectorMatcher<DirectiveMeta>; | ||
matcher: SelectorMatcher<DirectiveMeta[]>; | ||
/** | ||
@@ -50,2 +49,3 @@ * All of the directives available in the compilation scope of the declaring NgModule. | ||
private metaReader; | ||
private hostDirectivesResolver; | ||
/** | ||
@@ -60,3 +60,3 @@ * Cache of flattened directive metadata. Because flattened metadata is scope-invariant it's | ||
private scopeCache; | ||
constructor(scopeReader: ComponentScopeReader, metaReader: MetadataReader); | ||
constructor(scopeReader: ComponentScopeReader, metaReader: MetadataReader, hostDirectivesResolver: HostDirectivesResolver); | ||
/** | ||
@@ -68,3 +68,3 @@ * Computes the type-check scope information for the component declaration. If the NgModule | ||
getTypeCheckScope(node: ClassDeclaration): TypeCheckScope; | ||
getTypeCheckDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta; | ||
getTypeCheckDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta | null; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/scope/src/util" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { Reference } from '../../imports'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/api" /> | ||
/** | ||
@@ -46,20 +45,1 @@ * @license | ||
} | ||
/** | ||
* Maintains a mapping of which symbols in a .ngfactory file have been used. | ||
* | ||
* .ngfactory files are generated with one symbol per defined class in the source file, regardless | ||
* of whether the classes in the source files are NgModules (because that isn't known at the time | ||
* the factory files are generated). A `FactoryTracker` supports removing factory symbols which | ||
* didn't end up being NgModules, by tracking the ones which are. | ||
*/ | ||
export interface FactoryTracker { | ||
readonly sourceInfo: Map<string, FactoryInfo>; | ||
track(sf: ts.SourceFile, moduleInfo: ModuleInfo): void; | ||
} | ||
export interface FactoryInfo { | ||
sourceFilePath: string; | ||
moduleSymbols: Map<string, ModuleInfo>; | ||
} | ||
export interface ModuleInfo { | ||
name: string; | ||
} |
@@ -8,7 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims" /> | ||
export { ShimAdapter } from './src/adapter'; | ||
export { copyFileShimData, isShim, retagAllTsFiles, retagTsFile, sfExtensionData, untagAllTsFiles, untagTsFile } from './src/expando'; | ||
export { FactoryGenerator, generatedFactoryTransform } from './src/factory_generator'; | ||
export { ShimReferenceTagger } from './src/reference_tagger'; | ||
export { SummaryGenerator } from './src/summary_generator'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/adapter" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/expando" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/reference_tagger" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/shims/src/util" /> | ||
import { AbsoluteFsPath } from '../../file_system'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps/src/content_origin" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * From where the content for a source file or source-map came. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps/src/raw_source_map" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps/src/segment_marker" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * A marker that indicates the start of a segment in a mapping. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader" /> | ||
import { AbsoluteFsPath, ReadonlyFileSystem } from '../../file_system'; | ||
@@ -3,0 +2,0 @@ import { Logger } from '../../logging'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/sourcemaps/src/source_file" /> | ||
import { AbsoluteFsPath, PathManipulation } from '../../file_system'; | ||
@@ -3,0 +2,0 @@ import { RawSourceMap, SourceMapInfo } from './raw_source_map'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform" /> | ||
export * from './src/api'; | ||
@@ -11,0 +10,0 @@ export { aliasTransformFactory } from './src/alias'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/alias" /> | ||
import ts from 'typescript'; | ||
export declare function aliasTransformFactory(exportStatements: Map<string, Map<string, [string, string]>>): ts.TransformerFactory<ts.SourceFile>; |
@@ -8,9 +8,8 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/api" /> | ||
import { ConstantPool, Expression, Statement, Type } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Reexport } from '../../imports'; | ||
import { Reexport, ReferenceEmitter } from '../../imports'; | ||
import { SemanticSymbol } from '../../incremental/semantic_graph'; | ||
import { IndexingContext } from '../../indexer'; | ||
import { ClassDeclaration, Decorator } from '../../reflection'; | ||
import { ClassDeclaration, Decorator, ReflectionHost } from '../../reflection'; | ||
import { ImportManager } from '../../translator'; | ||
@@ -31,3 +30,8 @@ import { TypeCheckContext } from '../../typecheck/api'; | ||
*/ | ||
PARTIAL = 1 | ||
PARTIAL = 1, | ||
/** | ||
* Generates code based on each individual source file without using its | ||
* dependencies (suitable for local dev edit/refresh workflow). | ||
*/ | ||
LOCAL = 2 | ||
} | ||
@@ -55,21 +59,2 @@ export declare enum HandlerPrecedence { | ||
/** | ||
* A set of options which can be passed to a `DecoratorHandler` by a consumer, to tailor the output | ||
* of compilation beyond the decorators themselves. | ||
*/ | ||
export declare enum HandlerFlags { | ||
/** | ||
* No flags set. | ||
*/ | ||
NONE = 0, | ||
/** | ||
* Indicates that this decorator is fully inherited from its parent at runtime. In addition to | ||
* normally inherited aspects such as inputs and queries, full inheritance applies to every aspect | ||
* of the component or directive, such as the template function itself. | ||
* | ||
* Its primary effect is to cause the `CopyDefinitionFeature` to be applied to the definition | ||
* being compiled. See that class for more information. | ||
*/ | ||
FULL_INHERITANCE = 1 | ||
} | ||
/** | ||
* Provides the interface between a decorator compiler from @angular/compiler and the Typescript | ||
@@ -119,3 +104,3 @@ * compiler/transform. | ||
*/ | ||
analyze(node: ClassDeclaration, metadata: Readonly<D>, handlerFlags?: HandlerFlags): AnalysisOutput<A>; | ||
analyze(node: ClassDeclaration, metadata: Readonly<D>): AnalysisOutput<A>; | ||
/** | ||
@@ -172,4 +157,4 @@ * React to a change in a resource file by updating the `analysis` or `resolution`, under the | ||
* | ||
* If the compilation mode is configured as partial, and an implementation of `compilePartial` is | ||
* provided, then this method is not called. | ||
* If the compilation mode is configured as other than full but an implementation of the | ||
* corresponding method is not provided, then this method is called as a fallback. | ||
*/ | ||
@@ -186,2 +171,7 @@ compileFull(node: ClassDeclaration, analysis: Readonly<A>, resolution: Readonly<R>, constantPool: ConstantPool): CompileResult | CompileResult[]; | ||
compilePartial?(node: ClassDeclaration, analysis: Readonly<A>, resolution: Readonly<R>): CompileResult | CompileResult[]; | ||
/** | ||
* Generates code based on each individual source file without using its | ||
* dependencies (suitable for local dev edit/refresh workflow) | ||
*/ | ||
compileLocal(node: ClassDeclaration, analysis: Readonly<A>, constantPool: ConstantPool): CompileResult | CompileResult[]; | ||
} | ||
@@ -223,5 +213,6 @@ /** | ||
name: string; | ||
initializer: Expression; | ||
initializer: Expression | null; | ||
statements: Statement[]; | ||
type: Type; | ||
deferrableImports: Set<ts.ImportDeclaration> | null; | ||
} | ||
@@ -236,3 +227,3 @@ export interface ResolveResult<R> { | ||
transformFunctionDeclaration?(element: ts.FunctionDeclaration, imports: ImportManager): ts.FunctionDeclaration; | ||
transformClass?(clazz: ts.ClassDeclaration, elements: ReadonlyArray<ts.ClassElement>, imports: ImportManager): ts.ClassDeclaration; | ||
transformClass?(clazz: ts.ClassDeclaration, elements: ReadonlyArray<ts.ClassElement>, reflector: ReflectionHost, refEmitter: ReferenceEmitter, imports: ImportManager): ts.ClassDeclaration; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/compilation" /> | ||
import { ConstantPool } from '@angular/compiler'; | ||
@@ -21,3 +20,3 @@ import ts from 'typescript'; | ||
import { Xi18nContext } from '../../xi18n'; | ||
import { CompilationMode, CompileResult, DecoratorHandler, HandlerFlags } from './api'; | ||
import { CompilationMode, CompileResult, DecoratorHandler } from './api'; | ||
import { DtsTransformRegistry } from './declaration'; | ||
@@ -81,3 +80,3 @@ import { PendingTrait, Trait } from './trait'; | ||
*/ | ||
protected fileToClasses: Map<ts.SourceFile, Set<ClassDeclaration<DeclarationNode>>>; | ||
private fileToClasses; | ||
/** | ||
@@ -87,3 +86,3 @@ * Tracks which source files have been analyzed but did not contain any traits. This set allows | ||
*/ | ||
protected filesWithoutTraits: Set<ts.SourceFile>; | ||
private filesWithoutTraits; | ||
private reexportMap; | ||
@@ -96,6 +95,6 @@ private handlersByName; | ||
recordFor(clazz: ClassDeclaration): ClassRecord | null; | ||
recordsFor(sf: ts.SourceFile): ClassRecord[] | null; | ||
getAnalyzedRecords(): Map<ts.SourceFile, ClassRecord[]>; | ||
/** | ||
* Import a `ClassRecord` from a previous compilation. | ||
* Import a `ClassRecord` from a previous compilation (only to be used in global compilation | ||
* modes) | ||
* | ||
@@ -111,4 +110,4 @@ * Traits from the `ClassRecord` have accurate metadata, but the `handler` is from the old program | ||
private makeSymbolForTrait; | ||
protected analyzeClass(clazz: ClassDeclaration, preanalyzeQueue: Promise<void>[] | null): void; | ||
protected analyzeTrait(clazz: ClassDeclaration, trait: Trait<unknown, unknown, SemanticSymbol | null, unknown>, flags?: HandlerFlags): void; | ||
private analyzeClass; | ||
private analyzeTrait; | ||
resolve(): void; | ||
@@ -115,0 +114,0 @@ /** |
@@ -8,7 +8,6 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/declaration" /> | ||
import { Type } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { ImportRewriter } from '../../imports'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
import { ImportRewriter, ReferenceEmitter } from '../../imports'; | ||
import { ClassDeclaration, ReflectionHost } from '../../reflection'; | ||
import { ImportManager } from '../../translator'; | ||
@@ -29,3 +28,3 @@ import { DtsTransform } from './api'; | ||
} | ||
export declare function declarationTransformFactory(transformRegistry: DtsTransformRegistry, importRewriter: ImportRewriter, importPrefix?: string): ts.TransformerFactory<ts.SourceFile>; | ||
export declare function declarationTransformFactory(transformRegistry: DtsTransformRegistry, reflector: ReflectionHost, refEmitter: ReferenceEmitter, importRewriter: ImportRewriter, importPrefix?: string): ts.TransformerFactory<ts.SourceFile>; | ||
export interface IvyDeclarationField { | ||
@@ -38,3 +37,3 @@ name: string; | ||
addFields(decl: ClassDeclaration, fields: IvyDeclarationField[]): void; | ||
transformClass(clazz: ts.ClassDeclaration, members: ReadonlyArray<ts.ClassElement>, imports: ImportManager): ts.ClassDeclaration; | ||
transformClass(clazz: ts.ClassDeclaration, members: ReadonlyArray<ts.ClassElement>, reflector: ReflectionHost, refEmitter: ReferenceEmitter, imports: ImportManager): ts.ClassDeclaration; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/trait" /> | ||
import ts from 'typescript'; | ||
@@ -44,3 +43,3 @@ import { SemanticSymbol } from '../../incremental/semantic_graph'; | ||
*/ | ||
export declare type Trait<D, A, S extends SemanticSymbol | null, R> = PendingTrait<D, A, S, R> | SkippedTrait<D, A, S, R> | AnalyzedTrait<D, A, S, R> | ResolvedTrait<D, A, S, R>; | ||
export type Trait<D, A, S extends SemanticSymbol | null, R> = PendingTrait<D, A, S, R> | SkippedTrait<D, A, S, R> | AnalyzedTrait<D, A, S, R> | ResolvedTrait<D, A, S, R>; | ||
/** | ||
@@ -47,0 +46,0 @@ * The value side of `Trait` exposes a helper to create a `Trait` in a pending state (by delegating |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/transform" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { DefaultImportTracker, ImportRewriter } from '../../imports'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/transform/src/utils" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator" /> | ||
export { AstFactory, BinaryOperator, LeadingComment, ObjectLiteralProperty, SourceMapLocation, SourceMapRange, TemplateElement, TemplateLiteral, UnaryOperator, VariableDeclarationType } from './src/api/ast_factory'; | ||
@@ -15,4 +14,5 @@ export { ImportGenerator, NamedImport } from './src/api/import_generator'; | ||
export { ExpressionTranslatorVisitor, RecordWrappedNodeFn, TranslatorOptions } from './src/translator'; | ||
export { canEmitType, TypeEmitter, TypeReferenceTranslator } from './src/type_emitter'; | ||
export { translateType } from './src/type_translator'; | ||
export { attachComments, createTemplateMiddle, createTemplateTail, TypeScriptAstFactory } from './src/typescript_ast_factory'; | ||
export { translateExpression, translateStatement } from './src/typescript_translator'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/api/ast_factory" /> | ||
/** | ||
@@ -99,2 +98,9 @@ * Used to create transpiler specific AST nodes from Angular Output AST nodes in an abstract way. | ||
/** | ||
* Creates an expression that represents a dynamic import | ||
* (e.g. `import('./some/path')`) | ||
* | ||
* @param url the URL that should by used in the dynamic import | ||
*/ | ||
createDynamicImport(url: string): TExpression; | ||
/** | ||
* Create an identifier. | ||
@@ -204,11 +210,11 @@ * | ||
*/ | ||
export declare type VariableDeclarationType = 'const' | 'let' | 'var'; | ||
export type VariableDeclarationType = 'const' | 'let' | 'var'; | ||
/** | ||
* The unary operators supported by the `AstFactory`. | ||
*/ | ||
export declare type UnaryOperator = '+' | '-' | '!'; | ||
export type UnaryOperator = '+' | '-' | '!'; | ||
/** | ||
* The binary operators supported by the `AstFactory`. | ||
*/ | ||
export declare type BinaryOperator = '&&' | '>' | '>=' | '&' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??'; | ||
export type BinaryOperator = '&&' | '>' | '>=' | '&' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??'; | ||
/** | ||
@@ -215,0 +221,0 @@ * The original location of the start or end of a node created by the `AstFactory`. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/api/import_generator" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * The symbol name and import namespace of an imported symbol, |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/context" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * The current context of a translator visitor as it traverses the AST tree. |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/import_manager" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/translator" /> | ||
/** | ||
@@ -13,3 +12,3 @@ * @license | ||
import { Context } from './context'; | ||
export declare type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void; | ||
export type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void; | ||
export interface TranslatorOptions<TExpression> { | ||
@@ -50,2 +49,3 @@ downlevelTaggedTemplates?: boolean; | ||
visitConditionalExpr(ast: o.ConditionalExpr, context: Context): TExpression; | ||
visitDynamicImportExpr(ast: o.DynamicImportExpr, context: any): TExpression; | ||
visitNotExpr(ast: o.NotExpr, context: Context): TExpression; | ||
@@ -52,0 +52,0 @@ visitFunctionExpr(ast: o.FunctionExpr, context: Context): TExpression; |
@@ -8,39 +8,7 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/type_translator" /> | ||
import * as o from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
import { Context } from './context'; | ||
import { ReferenceEmitter } from '../../imports'; | ||
import { ReflectionHost } from '../../reflection'; | ||
import { ImportManager } from './import_manager'; | ||
export declare function translateType(type: o.Type, imports: ImportManager): ts.TypeNode; | ||
export declare class TypeTranslatorVisitor implements o.ExpressionVisitor, o.TypeVisitor { | ||
private imports; | ||
constructor(imports: ImportManager); | ||
visitBuiltinType(type: o.BuiltinType, context: Context): ts.KeywordTypeNode; | ||
visitExpressionType(type: o.ExpressionType, context: Context): ts.TypeNode; | ||
visitArrayType(type: o.ArrayType, context: Context): ts.ArrayTypeNode; | ||
visitMapType(type: o.MapType, context: Context): ts.TypeLiteralNode; | ||
visitReadVarExpr(ast: o.ReadVarExpr, context: Context): ts.TypeQueryNode; | ||
visitWriteVarExpr(expr: o.WriteVarExpr, context: Context): never; | ||
visitWriteKeyExpr(expr: o.WriteKeyExpr, context: Context): never; | ||
visitWritePropExpr(expr: o.WritePropExpr, context: Context): never; | ||
visitInvokeFunctionExpr(ast: o.InvokeFunctionExpr, context: Context): never; | ||
visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, context: Context): never; | ||
visitInstantiateExpr(ast: o.InstantiateExpr, context: Context): never; | ||
visitLiteralExpr(ast: o.LiteralExpr, context: Context): ts.TypeNode; | ||
visitLocalizedString(ast: o.LocalizedString, context: Context): never; | ||
visitExternalExpr(ast: o.ExternalExpr, context: Context): ts.EntityName | ts.TypeReferenceNode; | ||
visitConditionalExpr(ast: o.ConditionalExpr, context: Context): void; | ||
visitNotExpr(ast: o.NotExpr, context: Context): void; | ||
visitFunctionExpr(ast: o.FunctionExpr, context: Context): void; | ||
visitUnaryOperatorExpr(ast: o.UnaryOperatorExpr, context: Context): void; | ||
visitBinaryOperatorExpr(ast: o.BinaryOperatorExpr, context: Context): void; | ||
visitReadPropExpr(ast: o.ReadPropExpr, context: Context): void; | ||
visitReadKeyExpr(ast: o.ReadKeyExpr, context: Context): void; | ||
visitLiteralArrayExpr(ast: o.LiteralArrayExpr, context: Context): ts.TupleTypeNode; | ||
visitLiteralMapExpr(ast: o.LiteralMapExpr, context: Context): ts.TypeLiteralNode; | ||
visitCommaExpr(ast: o.CommaExpr, context: Context): void; | ||
visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, context: Context): ts.TypeNode; | ||
visitTypeofExpr(ast: o.TypeofExpr, context: Context): ts.TypeQueryNode; | ||
private translateType; | ||
private translateExpression; | ||
} | ||
export declare function translateType(type: o.Type, contextFile: ts.SourceFile, reflector: ReflectionHost, refEmitter: ReferenceEmitter, imports: ImportManager): ts.TypeNode; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory" /> | ||
/** | ||
@@ -27,2 +26,3 @@ * @license | ||
createExpressionStatement: (expression: ts.Expression) => ts.ExpressionStatement; | ||
createDynamicImport(url: string): ts.CallExpression; | ||
createFunctionDeclaration(functionName: string, parameters: string[], body: ts.Statement): ts.Statement; | ||
@@ -29,0 +29,0 @@ createFunctionExpression(functionName: string | null, parameters: string[], body: ts.Statement): ts.Expression; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/translator/src/typescript_translator" /> | ||
import * as o from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/tsc_plugin" /> | ||
import ts from 'typescript'; | ||
@@ -20,3 +19,3 @@ import { NgCompiler } from './core'; | ||
*/ | ||
interface PluginCompilerHost extends ts.CompilerHost, Partial<UnifiedModulesHost> { | ||
export interface PluginCompilerHost extends ts.CompilerHost, Partial<UnifiedModulesHost> { | ||
readonly inputFiles: ReadonlyArray<string>; | ||
@@ -23,0 +22,0 @@ } |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/api" /> | ||
import { AbsoluteSourceSpan, BoundTarget, DirectiveMeta, ParseSourceSpan, SchemaMetadata } from '@angular/compiler'; | ||
@@ -14,3 +13,3 @@ import ts from 'typescript'; | ||
import { Reference } from '../../imports'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta } from '../../metadata'; | ||
import { ClassPropertyMapping, DirectiveTypeCheckMeta, HostDirectiveMeta, InputMapping } from '../../metadata'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
@@ -24,7 +23,10 @@ /** | ||
queries: string[]; | ||
inputs: ClassPropertyMapping; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
outputs: ClassPropertyMapping; | ||
isStandalone: boolean; | ||
isSignal: boolean; | ||
hostDirectives: HostDirectiveMeta[] | null; | ||
decorator: ts.Decorator | null; | ||
} | ||
export declare type TemplateId = string & { | ||
export type TemplateId = string & { | ||
__brand: 'TemplateId'; | ||
@@ -49,3 +51,3 @@ }; | ||
*/ | ||
export declare type NgTemplateDiagnostic<T extends ErrorCode> = TemplateDiagnostic & { | ||
export type NgTemplateDiagnostic<T extends ErrorCode> = TemplateDiagnostic & { | ||
__ngCode: T; | ||
@@ -88,4 +90,3 @@ }; | ||
fields: { | ||
inputs: string[]; | ||
outputs: string[]; | ||
inputs: ClassPropertyMapping<InputMapping>; | ||
queries: string[]; | ||
@@ -289,3 +290,3 @@ }; | ||
} | ||
export declare type TemplateSourceMapping = DirectTemplateSourceMapping | IndirectTemplateSourceMapping | ExternalTemplateSourceMapping; | ||
export type TemplateSourceMapping = DirectTemplateSourceMapping | IndirectTemplateSourceMapping | ExternalTemplateSourceMapping; | ||
/** | ||
@@ -292,0 +293,0 @@ * A mapping to an inline template in a TS file. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/checker" /> | ||
import { AST, LiteralPrimitive, ParseSourceSpan, PropertyRead, SafePropertyRead, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler'; | ||
@@ -14,5 +13,8 @@ import ts from 'typescript'; | ||
import { ErrorCode } from '../../diagnostics'; | ||
import { Reference } from '../../imports'; | ||
import { NgModuleMeta, PipeMeta } from '../../metadata'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
import { FullTemplateMapping, NgTemplateDiagnostic, TypeCheckableDirectiveMeta } from './api'; | ||
import { GlobalCompletion } from './completion'; | ||
import { DirectiveInScope, PipeInScope } from './scope'; | ||
import { PotentialDirective, PotentialImport, PotentialImportMode, PotentialPipe } from './scope'; | ||
import { ElementSymbol, Symbol, TcbLocation, TemplateSymbol } from './symbols'; | ||
@@ -114,16 +116,21 @@ /** | ||
/** | ||
* Get basic metadata on the directives which are in scope for the given component. | ||
* Get basic metadata on the directives which are in scope or can be imported for the given | ||
* component. | ||
*/ | ||
getDirectivesInScope(component: ts.ClassDeclaration): DirectiveInScope[] | null; | ||
getPotentialTemplateDirectives(component: ts.ClassDeclaration): PotentialDirective[]; | ||
/** | ||
* Get basic metadata on the pipes which are in scope for the given component. | ||
* Get basic metadata on the pipes which are in scope or can be imported for the given component. | ||
*/ | ||
getPipesInScope(component: ts.ClassDeclaration): PipeInScope[] | null; | ||
getPotentialPipes(component: ts.ClassDeclaration): PotentialPipe[]; | ||
/** | ||
* Retrieve a `Map` of potential template element tags, to either the `DirectiveInScope` that | ||
* Retrieve a `Map` of potential template element tags, to either the `PotentialDirective` that | ||
* declares them (if the tag is from a directive/component), or `null` if the tag originates from | ||
* the DOM schema. | ||
*/ | ||
getPotentialElementTags(component: ts.ClassDeclaration): Map<string, DirectiveInScope | null>; | ||
getPotentialElementTags(component: ts.ClassDeclaration): Map<string, PotentialDirective | null>; | ||
/** | ||
* In the context of an Angular trait, generate potential imports for a directive. | ||
*/ | ||
getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inComponent: ts.ClassDeclaration, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>; | ||
/** | ||
* Get the primary decorator for an Angular class (such as @Component). This does not work for | ||
@@ -158,2 +165,18 @@ * `@Injectable`. | ||
/** | ||
* Retrieve the type checking engine's metadata for the given NgModule class, if available. | ||
*/ | ||
getNgModuleMetadata(module: ts.ClassDeclaration): NgModuleMeta | null; | ||
/** | ||
* Retrieve the type checking engine's metadata for the given pipe class, if available. | ||
*/ | ||
getPipeMetadata(pipe: ts.ClassDeclaration): PipeMeta | null; | ||
/** | ||
* Gets the directives that have been used in a component's template. | ||
*/ | ||
getUsedDirectives(component: ts.ClassDeclaration): TypeCheckableDirectiveMeta[] | null; | ||
/** | ||
* Gets the pipes that have been used in a component's template. | ||
*/ | ||
getUsedPipes(component: ts.ClassDeclaration): string[] | null; | ||
/** | ||
* Reset the `TemplateTypeChecker`'s state for the given class, so that it will be recomputed on | ||
@@ -160,0 +183,0 @@ * the next request. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/completion" /> | ||
import { TmplAstReference, TmplAstVariable } from '@angular/compiler'; | ||
@@ -15,3 +14,3 @@ import { TcbLocation } from './symbols'; | ||
*/ | ||
export declare type Completion = ReferenceCompletion | VariableCompletion; | ||
export type Completion = ReferenceCompletion | VariableCompletion; | ||
/** | ||
@@ -18,0 +17,0 @@ * Discriminant of an autocompletion source (a `Completion`). |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/context" /> | ||
import { ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstNode } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api" /> | ||
export * from './api'; | ||
@@ -11,0 +10,0 @@ export * from './checker'; |
@@ -8,10 +8,28 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/scope" /> | ||
import ts from 'typescript'; | ||
import { Reference } from '../../imports'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
import { SymbolWithValueDeclaration } from '../../util/src/typescript'; | ||
/** | ||
* Metadata on a directive which is available in the scope of a template. | ||
* A PotentialImport for some Angular trait has a TypeScript module specifier, which can be | ||
* relative, as well as an identifier name. | ||
*/ | ||
export interface DirectiveInScope { | ||
export interface PotentialImport { | ||
kind: PotentialImportKind; | ||
moduleSpecifier?: string; | ||
symbolName: string; | ||
isForwardReference: boolean; | ||
} | ||
/** | ||
* Which kind of Angular Trait the import targets. | ||
*/ | ||
export declare enum PotentialImportKind { | ||
NgModule = 0, | ||
Standalone = 1 | ||
} | ||
/** | ||
* Metadata on a directive which is available in a template. | ||
*/ | ||
export interface PotentialDirective { | ||
ref: Reference<ClassDeclaration>; | ||
/** | ||
@@ -28,3 +46,3 @@ * The `ts.Symbol` for the directive class. | ||
*/ | ||
selector: string; | ||
selector: string | null; | ||
/** | ||
@@ -38,7 +56,12 @@ * `true` if this directive is a component. | ||
isStructural: boolean; | ||
/** | ||
* Whether or not this directive is in scope. | ||
*/ | ||
isInScope: boolean; | ||
} | ||
/** | ||
* Metadata for a pipe which is available in the scope of a template. | ||
* Metadata for a pipe which is available in a template. | ||
*/ | ||
export interface PipeInScope { | ||
export interface PotentialPipe { | ||
ref: Reference<ClassDeclaration>; | ||
/** | ||
@@ -52,2 +75,19 @@ * The `ts.Symbol` for the pipe class. | ||
name: string; | ||
/** | ||
* Whether or not this pipe is in scope. | ||
*/ | ||
isInScope: boolean; | ||
} | ||
/** | ||
* Possible modes in which to look up a potential import. | ||
*/ | ||
export declare enum PotentialImportMode { | ||
/** Whether an import is standalone is inferred based on its metadata. */ | ||
Normal = 0, | ||
/** | ||
* An import is assumed to be standalone and is imported directly. This is useful for migrations | ||
* where a declaration wasn't standalone when the program was created, but will become standalone | ||
* as a part of the migration. | ||
*/ | ||
ForceDirect = 1 | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/api/symbols" /> | ||
import { TmplAstElement, TmplAstReference, TmplAstTemplate, TmplAstVariable } from '@angular/compiler'; | ||
@@ -14,3 +13,3 @@ import ts from 'typescript'; | ||
import { SymbolWithValueDeclaration } from '../../util/src/typescript'; | ||
import { DirectiveInScope } from './scope'; | ||
import { PotentialDirective } from './scope'; | ||
export declare enum SymbolKind { | ||
@@ -32,7 +31,7 @@ Input = 0, | ||
*/ | ||
export declare type Symbol = InputBindingSymbol | OutputBindingSymbol | ElementSymbol | ReferenceSymbol | VariableSymbol | ExpressionSymbol | DirectiveSymbol | TemplateSymbol | DomBindingSymbol | PipeSymbol; | ||
export type Symbol = InputBindingSymbol | OutputBindingSymbol | ElementSymbol | ReferenceSymbol | VariableSymbol | ExpressionSymbol | DirectiveSymbol | TemplateSymbol | DomBindingSymbol | PipeSymbol; | ||
/** | ||
* A `Symbol` which declares a new named entity in the template scope. | ||
*/ | ||
export declare type TemplateDeclarationSymbol = ReferenceSymbol | VariableSymbol; | ||
export type TemplateDeclarationSymbol = ReferenceSymbol | VariableSymbol; | ||
/** | ||
@@ -216,7 +215,4 @@ * Information about where a `ts.Node` can be found in the type check file. This can either be | ||
} | ||
/** | ||
* A representation of a directive/component whose selector matches a node in a component | ||
* template. | ||
*/ | ||
export interface DirectiveSymbol extends DirectiveInScope { | ||
/** Interface shared between host and non-host directives. */ | ||
interface DirectiveSymbolBase extends PotentialDirective { | ||
kind: SymbolKind.Directive; | ||
@@ -229,2 +225,13 @@ /** The `ts.Type` for the class declaration. */ | ||
/** | ||
* A representation of a directive/component whose selector matches a node in a component | ||
* template. | ||
*/ | ||
export type DirectiveSymbol = (DirectiveSymbolBase & { | ||
isHostDirective: false; | ||
}) | (DirectiveSymbolBase & { | ||
isHostDirective: true; | ||
exposedInputs: Record<string, string> | null; | ||
exposedOutputs: Record<string, string> | null; | ||
}); | ||
/** | ||
* A representation of an attribute on an element or template. These bindings aren't currently | ||
@@ -265,1 +272,2 @@ * type-checked (see `checkTypeOfDomBindings`) so they won't have a `ts.Type`, `ts.Symbol`, or shim | ||
} | ||
export {}; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/diagnostics" /> | ||
export * from './src/diagnostic'; | ||
export * from './src/id'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic" /> | ||
import { ParseSourceSpan } from '@angular/compiler'; | ||
@@ -22,2 +21,6 @@ import ts from 'typescript'; | ||
}[]): TemplateDiagnostic; | ||
export declare function setParseTemplateAsSourceFileForTest(fn: typeof parseTemplateAsSourceFile): void; | ||
export declare function resetParseTemplateAsSourceFileForTest(): void; | ||
declare function parseTemplateAsSourceFile(fileName: string, template: string): ts.SourceFile; | ||
export declare function isTemplateDiagnostic(diagnostic: ts.Diagnostic): diagnostic is TemplateDiagnostic; | ||
export {}; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id" /> | ||
import { DeclarationNode } from '../../../reflection'; | ||
import { TemplateId } from '../../api'; | ||
export declare function getTemplateId(clazz: DeclarationNode): TemplateId; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api/api" /> | ||
import { AST, ParseSourceSpan, TmplAstNode } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api/extended_template_checker" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { TemplateDiagnostic } from '../../api'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/api" /> | ||
export * from './api'; | ||
export * from './extended_template_checker'; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.INVALID_BANANA_IN_BOX, ExtendedTemplateDiagnosticName.INVALID_BANANA_IN_BOX>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
@@ -11,0 +10,0 @@ import { TemplateCheckFactory } from '../../api'; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.MISSING_NGFOROF_LET, ExtendedTemplateDiagnosticName.MISSING_NGFOROF_LET>; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.NULLISH_COALESCING_NOT_NULLABLE, ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE>; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE, ExtendedTemplateDiagnosticName.OPTIONAL_CHAIN_NOT_NULLABLE>; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.SUFFIX_NOT_SUPPORTED, ExtendedTemplateDiagnosticName.SUFFIX_NOT_SUPPORTED>; |
@@ -8,5 +8,4 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics'; | ||
import { TemplateCheckFactory } from '../../api'; | ||
export declare const factory: TemplateCheckFactory<ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING, ExtendedTemplateDiagnosticName.TEXT_ATTRIBUTE_NOT_BINDING>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended" /> | ||
import { ErrorCode, ExtendedTemplateDiagnosticName } from '../../diagnostics'; | ||
@@ -11,0 +10,0 @@ import { TemplateCheckFactory } from './api'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { NgCompilerOptions } from '../../../core/api'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck" /> | ||
export { FileTypeCheckingData, TemplateTypeCheckerImpl } from './src/checker'; | ||
@@ -11,0 +10,0 @@ export { TypeCheckContextImpl } from './src/context'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/checker" /> | ||
import { AST, LiteralPrimitive, ParseSourceSpan, PropertyRead, SafePropertyRead, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler'; | ||
@@ -14,10 +13,10 @@ import ts from 'typescript'; | ||
import { AbsoluteFsPath } from '../../file_system'; | ||
import { ReferenceEmitter } from '../../imports'; | ||
import { Reference, ReferenceEmitter } from '../../imports'; | ||
import { IncrementalBuild } from '../../incremental/api'; | ||
import { MetadataReader } from '../../metadata'; | ||
import { MetadataReader, MetadataReaderWithIndex, NgModuleIndex, NgModuleMeta, PipeMeta } from '../../metadata'; | ||
import { PerfRecorder } from '../../perf'; | ||
import { ProgramDriver } from '../../program_driver'; | ||
import { ReflectionHost } from '../../reflection'; | ||
import { ClassDeclaration, ReflectionHost } from '../../reflection'; | ||
import { ComponentScopeReader, TypeCheckScopeRegistry } from '../../scope'; | ||
import { DirectiveInScope, ElementSymbol, FullTemplateMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PipeInScope, ProgramTypeCheckAdapter, TcbLocation, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig } from '../api'; | ||
import { ElementSymbol, FullTemplateMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PotentialDirective, PotentialImport, PotentialImportMode, PotentialPipe, ProgramTypeCheckAdapter, TcbLocation, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig } from '../api'; | ||
import { ShimTypeCheckingData } from './context'; | ||
@@ -40,2 +39,4 @@ import { TemplateSourceManager } from './source'; | ||
private readonly metaReader; | ||
private readonly localMetaReader; | ||
private readonly ngModuleIndex; | ||
private readonly componentScopeReader; | ||
@@ -79,4 +80,6 @@ private readonly typeCheckScopeRegistry; | ||
private isComplete; | ||
constructor(originalProgram: ts.Program, programDriver: ProgramDriver, typeCheckAdapter: ProgramTypeCheckAdapter, config: TypeCheckingConfig, refEmitter: ReferenceEmitter, reflector: ReflectionHost, compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>, priorBuild: IncrementalBuild<unknown, FileTypeCheckingData>, metaReader: MetadataReader, componentScopeReader: ComponentScopeReader, typeCheckScopeRegistry: TypeCheckScopeRegistry, perf: PerfRecorder); | ||
constructor(originalProgram: ts.Program, programDriver: ProgramDriver, typeCheckAdapter: ProgramTypeCheckAdapter, config: TypeCheckingConfig, refEmitter: ReferenceEmitter, reflector: ReflectionHost, compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>, priorBuild: IncrementalBuild<unknown, FileTypeCheckingData>, metaReader: MetadataReader, localMetaReader: MetadataReaderWithIndex, ngModuleIndex: NgModuleIndex, componentScopeReader: ComponentScopeReader, typeCheckScopeRegistry: TypeCheckScopeRegistry, perf: PerfRecorder); | ||
getTemplate(component: ts.ClassDeclaration): TmplAstNode[] | null; | ||
getUsedDirectives(component: ts.ClassDeclaration): TypeCheckableDirectiveMeta[] | null; | ||
getUsedPipes(component: ts.ClassDeclaration): string[] | null; | ||
private getLatestComponentState; | ||
@@ -123,6 +126,8 @@ isTrackedTypeCheckFile(filePath: AbsoluteFsPath): boolean; | ||
private getOrCreateSymbolBuilder; | ||
getDirectivesInScope(component: ts.ClassDeclaration): DirectiveInScope[] | null; | ||
getPipesInScope(component: ts.ClassDeclaration): PipeInScope[] | null; | ||
getPotentialTemplateDirectives(component: ts.ClassDeclaration): PotentialDirective[]; | ||
getPotentialPipes(component: ts.ClassDeclaration): PotentialPipe[]; | ||
getDirectiveMetadata(dir: ts.ClassDeclaration): TypeCheckableDirectiveMeta | null; | ||
getPotentialElementTags(component: ts.ClassDeclaration): Map<string, DirectiveInScope | null>; | ||
getNgModuleMetadata(module: ts.ClassDeclaration): NgModuleMeta | null; | ||
getPipeMetadata(pipe: ts.ClassDeclaration): PipeMeta | null; | ||
getPotentialElementTags(component: ts.ClassDeclaration): Map<string, PotentialDirective | null>; | ||
getPotentialDomBindings(tagName: string): { | ||
@@ -135,3 +140,7 @@ attribute: string; | ||
getOwningNgModule(component: ts.ClassDeclaration): ts.ClassDeclaration | null; | ||
private emit; | ||
getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inContext: ts.ClassDeclaration, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>; | ||
private getScopeData; | ||
private scopeDataOfDirectiveMeta; | ||
private scopeDataOfPipeMeta; | ||
} | ||
@@ -138,0 +147,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/comments" /> | ||
import { AbsoluteSourceSpan, ParseSourceSpan } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/completion" /> | ||
import { AST, LiteralPrimitive, PropertyRead, PropertyWrite, SafePropertyRead, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/context" /> | ||
import { BoundTarget, ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstNode } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/diagnostics" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/dom" /> | ||
import { ParseSourceSpan, SchemaMetadata, TmplAstElement } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import { TemplateDiagnostic, TemplateId } from '../api'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/environment" /> | ||
import { Type } from '@angular/compiler'; | ||
import { TransplantedType, Type } from '@angular/compiler'; | ||
import ts from 'typescript'; | ||
@@ -69,3 +68,9 @@ import { Reference, ReferenceEmitter } from '../../imports'; | ||
referenceExternalType(moduleName: string, name: string, typeParams?: Type[]): ts.TypeNode; | ||
/** | ||
* Generates a `ts.TypeNode` representing a type that is being referenced from a different place | ||
* in the program. Any type references inside the transplanted type will be rewritten so that | ||
* they can be imported in the context file. | ||
*/ | ||
referenceTransplantedType(type: TransplantedType<Reference<ts.TypeNode>>): ts.TypeNode; | ||
getPreludeStatements(): ts.Statement[]; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/expression" /> | ||
import { AST } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/line_mappings" /> | ||
/** Gets the line and character for the given position from the line starts map. */ | ||
@@ -11,0 +10,0 @@ export declare function getLineAndCharacterFromPosition(lineStartsMap: number[], position: number): { |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/oob" /> | ||
import { BindingPipe, PropertyWrite, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstReference, TmplAstVariable } from '@angular/compiler'; | ||
import { BindingPipe, PropertyWrite, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstReference, TmplAstTemplate, TmplAstVariable } from '@angular/compiler'; | ||
import { ClassDeclaration } from '../../reflection'; | ||
@@ -64,2 +63,4 @@ import { TemplateDiagnostic, TemplateId } from '../api'; | ||
splitTwoWayBinding(templateId: TemplateId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void; | ||
/** Reports required inputs that haven't been bound. */ | ||
missingRequiredInputs(templateId: TemplateId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void; | ||
} | ||
@@ -84,2 +85,3 @@ export declare class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecorder { | ||
splitTwoWayBinding(templateId: TemplateId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void; | ||
missingRequiredInputs(templateId: TemplateId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/shim" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { AbsoluteFsPath } from '../../file_system'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/source" /> | ||
import { AbsoluteSourceSpan, ParseSourceFile, ParseSourceSpan } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/tcb_util" /> | ||
import { AbsoluteSourceSpan, ParseSourceSpan } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/template_semantics" /> | ||
import { AST, BoundTarget, PropertyWrite, RecursiveAstVisitor } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import { TemplateId } from '../api'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder" /> | ||
import { AST, TmplAstElement, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstVariable } from '@angular/compiler'; | ||
@@ -37,2 +36,3 @@ import ts from 'typescript'; | ||
private getDirectivesOfNode; | ||
private addHostDirectiveSymbols; | ||
private getDirectiveMeta; | ||
@@ -39,0 +39,0 @@ private getDirectiveModule; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/ts_util" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ export declare function tsCastToAny(expr: ts.Expression): ts.Expression; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block" /> | ||
import { BoundTarget, SchemaMetadata, TmplAstElement, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstVariable } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_file" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/type_constructor" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { ClassDeclaration, ReflectionHost } from '../../reflection'; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * @license |
@@ -1,3 +0,2 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/util/src/path" /> | ||
export declare function relativePathBetween(from: string, to: string): string | null; | ||
export declare function normalizeSeparators(path: string): string; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/util/src/typescript" /> | ||
import ts from 'typescript'; | ||
@@ -16,3 +15,3 @@ import { AbsoluteFsPath } from '../../file_system'; | ||
*/ | ||
export declare type SymbolWithValueDeclaration = ts.Symbol & { | ||
export type SymbolWithValueDeclaration = ts.Symbol & { | ||
valueDeclaration: ts.Declaration; | ||
@@ -55,3 +54,3 @@ declarations: ts.Declaration[]; | ||
*/ | ||
export declare type SubsetOfKeys<T, K extends keyof T> = K; | ||
export type SubsetOfKeys<T, K extends keyof T> = K; | ||
/** | ||
@@ -61,3 +60,3 @@ * Represents the type `T`, with a transformation applied that turns all methods (even optional | ||
*/ | ||
export declare type RequiredDelegations<T> = { | ||
export type RequiredDelegations<T> = { | ||
[M in keyof Required<T>]: T[M]; | ||
@@ -64,0 +63,0 @@ }; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/util/src/visitor" /> | ||
import ts from 'typescript'; | ||
@@ -15,3 +14,3 @@ /** | ||
*/ | ||
export declare type VisitListEntryResult<B extends ts.Node, T extends B> = { | ||
export type VisitListEntryResult<B extends ts.Node, T extends B> = { | ||
node: T; | ||
@@ -18,0 +17,0 @@ before?: B[]; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/xi18n" /> | ||
export * from './src/context'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/ngtsc/xi18n/src/context" /> | ||
import { InterpolationConfig } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ /** |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/perform_compile" /> | ||
import ts from 'typescript'; | ||
@@ -15,3 +14,3 @@ import { AbsoluteFsPath, ReadonlyFileSystem } from '../src/ngtsc/file_system'; | ||
/** Used to read configuration files. */ | ||
export declare type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>; | ||
export type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>; | ||
export interface ParsedConfiguration { | ||
@@ -36,3 +35,3 @@ project: string; | ||
export declare function exitCodeFromResult(diags: ReadonlyArray<ts.Diagnostic> | undefined): number; | ||
export declare function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics, customTransformers, emitFlags, forceEmit, modifiedResourceFiles }: { | ||
export declare function performCompilation<CbEmitRes extends ts.EmitResult = ts.EmitResult>({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics, customTransformers, emitFlags, forceEmit, modifiedResourceFiles }: { | ||
rootNames: string[]; | ||
@@ -42,4 +41,4 @@ options: api.CompilerOptions; | ||
oldProgram?: api.Program; | ||
emitCallback?: api.TsEmitCallback; | ||
mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback; | ||
emitCallback?: api.TsEmitCallback<CbEmitRes>; | ||
mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback<CbEmitRes>; | ||
gatherDiagnostics?: (program: api.Program) => ReadonlyArray<ts.Diagnostic>; | ||
@@ -46,0 +45,0 @@ customTransformers?: api.CustomTransformers; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/perform_watch" /> | ||
import ts from 'typescript'; | ||
@@ -18,7 +17,7 @@ import { ParsedConfiguration } from './perform_compile'; | ||
} | ||
export interface PerformWatchHost { | ||
export interface PerformWatchHost<CbEmitRes extends ts.EmitResult = ts.EmitResult> { | ||
reportDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void; | ||
readConfiguration(): ParsedConfiguration; | ||
createCompilerHost(options: api.CompilerOptions): api.CompilerHost; | ||
createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback | undefined; | ||
createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback<CbEmitRes> | undefined; | ||
onFileChange(options: api.CompilerOptions, listener: (event: FileChangeEvent, fileName: string) => void, ready: () => void): { | ||
@@ -30,3 +29,3 @@ close: () => void; | ||
} | ||
export declare function createPerformWatchHost(configFileName: string, reportDiagnostics: (diagnostics: ReadonlyArray<ts.Diagnostic>) => void, existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) => api.TsEmitCallback | undefined): PerformWatchHost; | ||
export declare function createPerformWatchHost<CbEmitRes extends ts.EmitResult = ts.EmitResult>(configFileName: string, reportDiagnostics: (diagnostics: ReadonlyArray<ts.Diagnostic>) => void, existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) => api.TsEmitCallback<CbEmitRes> | undefined): PerformWatchHost; | ||
/** | ||
@@ -33,0 +32,0 @@ * The logic in this function is adapted from `tsc.ts` from TypeScript. |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/api" /> | ||
import ts from 'typescript'; | ||
@@ -31,7 +30,2 @@ import { ExtendedTsCompilerHost, NgCompilerOptions } from '../ngtsc/core/api'; | ||
/** | ||
* Whether to generate .ngsummary.ts files that allow to use AOTed artifacts | ||
* in JIT mode. This is off by default. | ||
*/ | ||
enableSummariesForJit?: boolean; | ||
/** | ||
* Whether to replace the `templateUrl` and `styleUrls` property in all | ||
@@ -105,7 +99,7 @@ * @Component decorators with inlined contents in `template` and `styles` | ||
} | ||
export interface TsEmitCallback { | ||
(args: TsEmitArguments): ts.EmitResult; | ||
export interface TsEmitCallback<T extends ts.EmitResult> { | ||
(args: TsEmitArguments): T; | ||
} | ||
export interface TsMergeEmitResultsCallback { | ||
(results: ts.EmitResult[]): ts.EmitResult; | ||
export interface TsMergeEmitResultsCallback<T extends ts.EmitResult> { | ||
(results: T[]): T; | ||
} | ||
@@ -123,2 +117,10 @@ export interface LazyRoute { | ||
} | ||
export interface EmitOptions<CbEmitRes extends ts.EmitResult> { | ||
emitFlags?: EmitFlags; | ||
forceEmit?: boolean; | ||
cancellationToken?: ts.CancellationToken; | ||
customTransformers?: CustomTransformers; | ||
emitCallback?: TsEmitCallback<CbEmitRes>; | ||
mergeEmitResultsCallback?: TsMergeEmitResultsCallback<CbEmitRes>; | ||
} | ||
export interface Program { | ||
@@ -186,10 +188,3 @@ /** | ||
*/ | ||
emit({ emitFlags, forceEmit, cancellationToken, customTransformers, emitCallback, mergeEmitResultsCallback, }?: { | ||
emitFlags?: EmitFlags; | ||
forceEmit?: boolean; | ||
cancellationToken?: ts.CancellationToken; | ||
customTransformers?: CustomTransformers; | ||
emitCallback?: TsEmitCallback; | ||
mergeEmitResultsCallback?: TsMergeEmitResultsCallback; | ||
}): ts.EmitResult; | ||
emit<CbEmitRes extends ts.EmitResult>(opts?: EmitOptions<CbEmitRes> | undefined): ts.EmitResult; | ||
} |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/compiler_host" /> | ||
import ts from 'typescript'; | ||
@@ -11,0 +10,0 @@ import { CompilerHost, CompilerOptions } from './api'; |
@@ -8,7 +8,10 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/downlevel_decorators_transform/downlevel_decorators_transform" /> | ||
import ts from 'typescript'; | ||
import { ReflectionHost } from '../../ngtsc/reflection'; | ||
/** | ||
* Gets a transformer for downleveling Angular decorators. | ||
* Gets a transformer for downleveling Angular constructor parameter and property decorators. | ||
* | ||
* Note that Angular class decorators are never processed as those rely on side effects that | ||
* would otherwise no longer be executed. i.e. the creation of a component definition. | ||
* | ||
* @param typeChecker Reference to the program's type checker. | ||
@@ -19,9 +22,3 @@ * @param host Reflection host that is used for determining decorators. | ||
* @param isClosureCompilerEnabled Whether closure annotations need to be added where needed. | ||
* @param skipClassDecorators Whether class decorators should be skipped from downleveling. | ||
* This is useful for JIT mode where class decorators should be preserved as they could rely | ||
* on immediate execution. e.g. downleveling `@Injectable` means that the injectable factory | ||
* is not created, and injecting the token will not work. If this decorator would not be | ||
* downleveled, the `Injectable` decorator will execute immediately on file load, and | ||
* Angular will generate the corresponding injectable factory. | ||
*/ | ||
export declare function getDownlevelDecoratorsTransform(typeChecker: ts.TypeChecker, host: ReflectionHost, diagnostics: ts.Diagnostic[], isCore: boolean, isClosureCompilerEnabled: boolean, skipClassDecorators: boolean): ts.TransformerFactory<ts.SourceFile>; | ||
export declare function getDownlevelDecoratorsTransform(typeChecker: ts.TypeChecker, host: ReflectionHost, diagnostics: ts.Diagnostic[], isCore: boolean, isClosureCompilerEnabled: boolean): ts.TransformerFactory<ts.SourceFile>; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/downlevel_decorators_transform" /> | ||
export { getDownlevelDecoratorsTransform } from './downlevel_decorators_transform'; |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/entry_points" /> | ||
export { createCompilerHost } from './compiler_host'; | ||
export { createProgram } from './program'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/i18n" /> | ||
import { MessageBundle } from '@angular/compiler'; | ||
@@ -11,0 +10,0 @@ import ts from 'typescript'; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/program" /> | ||
import { CompilerHost, CompilerOptions, Program } from './api'; | ||
@@ -11,0 +10,0 @@ export declare function createProgram({ rootNames, options, host, oldProgram }: { |
@@ -8,5 +8,3 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/transformers/util" /> | ||
import ts from 'typescript'; | ||
export declare const GENERATED_FILES: RegExp; | ||
export declare function error(msg: string): never; | ||
@@ -13,0 +11,0 @@ export declare function createMessageDiagnostic(messageText: string): ts.Diagnostic; |
@@ -1,2 +0,1 @@ | ||
/// <amd-module name="@angular/compiler-cli/src/typescript_support" /> | ||
export declare function setTypeScriptVersionForTesting(version: string): void; | ||
@@ -3,0 +2,0 @@ export declare function restoreTypeScriptVersionForTesting(): void; |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/version_helpers" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * Converts a `string` version into an array of numbers |
@@ -8,3 +8,2 @@ /** | ||
*/ | ||
/// <amd-module name="@angular/compiler-cli/src/version" /> | ||
/** | ||
@@ -11,0 +10,0 @@ * @module |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
10
28
1
2092413
320
2
80
35344
+ Added@angular/compiler@16.2.12(transitive)
+ Added@babel/core@7.23.2(transitive)
+ Addedtypescript@5.1.6(transitive)
- Removeddependency-graph@^0.11.0
- Removedmagic-string@^0.26.0
- Removedsourcemap-codec@^1.4.8
- Removed@angular/compiler@14.3.0(transitive)
- Removed@babel/core@7.25.9(transitive)
- Removeddependency-graph@0.11.0(transitive)
- Removedmagic-string@0.26.7(transitive)
- Removedsourcemap-codec@1.4.8(transitive)
- Removedtypescript@4.8.4(transitive)
Updated@babel/core@7.23.2