@angular/core 22.0.0-next.0 → 22.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_debug_node-chunk.mjs +2425 -1941
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +3 -5
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs.map +1 -1
- package/fesm2022/_pending_tasks-chunk.mjs +47 -44
- package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +55 -18
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +10 -7
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
- package/fesm2022/core.mjs +2332 -1884
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-di.mjs.map +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +2 -24
- package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives-signals.mjs +2 -2
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +6 -3
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +56 -25
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/can-match-snapshot-required.cjs +104 -0
- package/schematics/bundles/change-detection-eager.cjs +4 -7
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/http-xhr-backend.cjs +6 -11
- package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
- package/schematics/bundles/incremental-hydration.cjs +91 -0
- package/schematics/bundles/{index-BtLcQH8g.cjs → index-DADA7AvC.cjs} +7 -3
- package/schematics/bundles/inject-migration.cjs +26 -18
- package/schematics/bundles/json-file-Drblb4E1.cjs +1916 -0
- package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-MWoZx-Cb.cjs → migrate_ts_type_references-CdaIOlGY.cjs} +48 -28
- package/schematics/bundles/model-output.cjs +200 -0
- package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
- package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +14 -6
- package/schematics/bundles/ngstyle-to-style-migration.cjs +14 -6
- package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +2 -2
- package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
- package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
- package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +22 -2
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +3 -3
- package/schematics/bundles/signal-queries-migration.cjs +3 -3
- package/schematics/bundles/signals.cjs +3 -3
- package/schematics/bundles/standalone-migration.cjs +29 -17
- package/schematics/bundles/strict-safe-navigation-narrow.cjs +32 -0
- package/schematics/bundles/strict-templates-default.cjs +63 -0
- package/schematics/migrations.json +25 -0
- package/types/_api-chunk.d.ts +22 -4
- package/types/_chrome_dev_tools_performance-chunk.d.ts +4 -3
- package/types/{_discovery-chunk.d.ts → _debug_node-chunk.d.ts} +2157 -2258
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +6488 -6285
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +2 -1
- package/types/testing.d.ts +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v22.0.0-next.
|
|
3
|
+
* @license Angular v22.0.0-next.10
|
|
4
4
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -19,9 +19,9 @@ require('@angular-devkit/core');
|
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('./project_tsconfig_paths-DkkMibv-.cjs');
|
|
21
21
|
require('./apply_import_manager-CxA_YYgB.cjs');
|
|
22
|
-
require('./migrate_ts_type_references-
|
|
22
|
+
require('./migrate_ts_type_references-CdaIOlGY.cjs');
|
|
23
23
|
require('assert');
|
|
24
|
-
require('./index-
|
|
24
|
+
require('./index-DADA7AvC.cjs');
|
|
25
25
|
require('@angular/compiler');
|
|
26
26
|
require('./leading_space-BTPRV0wu.cjs');
|
|
27
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v22.0.0-next.
|
|
3
|
+
* @license Angular v22.0.0-next.10
|
|
4
4
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -339,7 +339,7 @@ function toStandalone(sourceFiles, program, printer, fileImportRemapper, declara
|
|
|
339
339
|
testObjects.forEach((obj) => testObjectsToMigrate.add(obj));
|
|
340
340
|
}
|
|
341
341
|
for (const declaration of declarations) {
|
|
342
|
-
convertNgModuleDeclarationToStandalone(declaration, declarations, tracker, templateTypeChecker, declarationImportRemapper);
|
|
342
|
+
convertNgModuleDeclarationToStandalone(declaration, declarations, tracker, templateTypeChecker, program.getTsProgram(), declarationImportRemapper);
|
|
343
343
|
}
|
|
344
344
|
for (const node of modulesToMigrate) {
|
|
345
345
|
migrateNgModuleClass(node, declarations, tracker, typeChecker, templateTypeChecker);
|
|
@@ -355,12 +355,12 @@ function toStandalone(sourceFiles, program, printer, fileImportRemapper, declara
|
|
|
355
355
|
* @param typeChecker
|
|
356
356
|
* @param importRemapper
|
|
357
357
|
*/
|
|
358
|
-
function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker, typeChecker, importRemapper) {
|
|
358
|
+
function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker, typeChecker, program, importRemapper) {
|
|
359
359
|
const directiveMeta = typeChecker.getDirectiveMetadata(decl);
|
|
360
360
|
if (directiveMeta && directiveMeta.decorator && !directiveMeta.isStandalone) {
|
|
361
361
|
let decorator = markDecoratorAsStandalone(directiveMeta.decorator);
|
|
362
362
|
if (directiveMeta.isComponent) {
|
|
363
|
-
const importsToAdd = getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, importRemapper);
|
|
363
|
+
const importsToAdd = getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, program, importRemapper);
|
|
364
364
|
if (importsToAdd.length > 0) {
|
|
365
365
|
const hasTrailingComma = importsToAdd.length > 2 &&
|
|
366
366
|
!!extractMetadataLiteral(directiveMeta.decorator)?.properties.hasTrailingComma;
|
|
@@ -387,8 +387,8 @@ function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker,
|
|
|
387
387
|
* @param typeChecker
|
|
388
388
|
* @param importRemapper
|
|
389
389
|
*/
|
|
390
|
-
function getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, importRemapper) {
|
|
391
|
-
const templateDependencies = findTemplateDependencies(decl, typeChecker);
|
|
390
|
+
function getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, program, importRemapper) {
|
|
391
|
+
const templateDependencies = findTemplateDependencies(decl, typeChecker, program);
|
|
392
392
|
const usedDependenciesInMigration = new Set(templateDependencies.filter((dep) => allDeclarations.has(dep.node)));
|
|
393
393
|
const seenImports = new Set();
|
|
394
394
|
const resolvedDependencies = [];
|
|
@@ -710,23 +710,29 @@ function findTestObjectsToMigrate(sourceFile, typeChecker) {
|
|
|
710
710
|
* @param decl Component in whose template we're looking for dependencies.
|
|
711
711
|
* @param typeChecker
|
|
712
712
|
*/
|
|
713
|
-
function findTemplateDependencies(decl, typeChecker) {
|
|
713
|
+
function findTemplateDependencies(decl, typeChecker, program) {
|
|
714
714
|
const results = [];
|
|
715
715
|
const usedDirectives = typeChecker.getUsedDirectives(decl);
|
|
716
716
|
const usedPipes = typeChecker.getUsedPipes(decl);
|
|
717
717
|
if (usedDirectives !== null) {
|
|
718
718
|
for (const dir of usedDirectives) {
|
|
719
|
-
|
|
720
|
-
results.push(dir.ref);
|
|
721
|
-
}
|
|
719
|
+
results.push(dir.ref);
|
|
722
720
|
}
|
|
723
721
|
}
|
|
724
722
|
if (usedPipes !== null) {
|
|
725
723
|
const potentialPipes = typeChecker.getPotentialPipes(decl);
|
|
726
724
|
for (const pipe of potentialPipes) {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
725
|
+
const sourceFile = program.getSourceFile(pipe.ref.filePath);
|
|
726
|
+
const node = sourceFile ? findTightestNode(sourceFile, pipe.ref.position) : null;
|
|
727
|
+
const classDecl = node ? nodes.closestNode(node, ts.isClassDeclaration) : null;
|
|
728
|
+
if (classDecl && usedPipes.some((current) => pipe.name === current)) {
|
|
729
|
+
const owningModule = pipe.ref.moduleSpecifier
|
|
730
|
+
? {
|
|
731
|
+
specifier: pipe.ref.moduleSpecifier,
|
|
732
|
+
resolutionContext: decl.getSourceFile().fileName,
|
|
733
|
+
}
|
|
734
|
+
: null;
|
|
735
|
+
results.push(new migrations.Reference(classDecl, owningModule));
|
|
730
736
|
}
|
|
731
737
|
}
|
|
732
738
|
}
|
|
@@ -920,6 +926,12 @@ function isStandaloneDeclaration(node, declarationsInMigration, templateTypeChec
|
|
|
920
926
|
const metadata = templateTypeChecker.getDirectiveMetadata(node) || templateTypeChecker.getPipeMetadata(node);
|
|
921
927
|
return metadata != null && metadata.isStandalone;
|
|
922
928
|
}
|
|
929
|
+
function findTightestNode(node, position) {
|
|
930
|
+
if (position < node.getStart() || position > node.getEnd()) {
|
|
931
|
+
return undefined;
|
|
932
|
+
}
|
|
933
|
+
return node.forEachChild((c) => findTightestNode(c, position)) ?? node;
|
|
934
|
+
}
|
|
923
935
|
|
|
924
936
|
function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, printer, importRemapper, referenceLookupExcludedFiles, declarationImportRemapper) {
|
|
925
937
|
const filesToRemove = new Set();
|
|
@@ -958,7 +970,7 @@ function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, pri
|
|
|
958
970
|
}
|
|
959
971
|
node.forEachChild(walk);
|
|
960
972
|
});
|
|
961
|
-
replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
973
|
+
replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, tsProgram, declarationImportRemapper);
|
|
962
974
|
replaceInTestImportsArray(testArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
|
|
963
975
|
// We collect all the places where we need to remove references first before generating the
|
|
964
976
|
// removal instructions since we may have to remove multiple references from one node.
|
|
@@ -1070,14 +1082,14 @@ function collectChangeLocations(ngModule, removalLocations, componentImportArray
|
|
|
1070
1082
|
* @param templateTypeChecker
|
|
1071
1083
|
* @param importRemapper
|
|
1072
1084
|
*/
|
|
1073
|
-
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, importRemapper) {
|
|
1085
|
+
function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, program, importRemapper) {
|
|
1074
1086
|
for (const [array, toReplace] of componentImportArrays.getEntries()) {
|
|
1075
1087
|
const closestClass = nodes.closestNode(array, ts.isClassDeclaration);
|
|
1076
1088
|
if (!closestClass) {
|
|
1077
1089
|
continue;
|
|
1078
1090
|
}
|
|
1079
1091
|
const replacements = new UniqueItemTracker();
|
|
1080
|
-
const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker).map((ref) => ref.node));
|
|
1092
|
+
const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker, program).map((ref) => ref.node));
|
|
1081
1093
|
const nodesToRemove = new Set();
|
|
1082
1094
|
for (const node of toReplace) {
|
|
1083
1095
|
const moduleDecl = findClassDeclaration(node, typeChecker);
|
|
@@ -1474,7 +1486,7 @@ function toStandaloneBootstrap(program, host, basePath, rootFileNames, sourceFil
|
|
|
1474
1486
|
// The previous migrations explicitly skip over bootstrapped
|
|
1475
1487
|
// declarations so we have to migrate them now.
|
|
1476
1488
|
for (const declaration of allDeclarations) {
|
|
1477
|
-
convertNgModuleDeclarationToStandalone(declaration, allDeclarations, tracker, templateTypeChecker, declarationImportRemapper);
|
|
1489
|
+
convertNgModuleDeclarationToStandalone(declaration, allDeclarations, tracker, templateTypeChecker, program.getTsProgram(), declarationImportRemapper);
|
|
1478
1490
|
}
|
|
1479
1491
|
migrateTestDeclarations(testObjects, allDeclarations, tracker, templateTypeChecker, typeChecker);
|
|
1480
1492
|
return tracker.recordChanges();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @license Angular v22.0.0-next.10
|
|
4
|
+
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DkkMibv-.cjs');
|
|
10
|
+
var jsonFile = require('./json-file-Drblb4E1.cjs');
|
|
11
|
+
require('@angular-devkit/core');
|
|
12
|
+
require('node:os');
|
|
13
|
+
|
|
14
|
+
function migrate() {
|
|
15
|
+
return async (tree) => {
|
|
16
|
+
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
17
|
+
const allPaths = [...new Set([...buildPaths, ...testPaths])];
|
|
18
|
+
for (const tsconfigPath of allPaths) {
|
|
19
|
+
const json = new jsonFile.jsonFileExports.JSONFile(tree, tsconfigPath);
|
|
20
|
+
const compilerOptions = json.get(['compilerOptions']);
|
|
21
|
+
if (!compilerOptions ||
|
|
22
|
+
typeof compilerOptions !== 'object' ||
|
|
23
|
+
Object.keys(compilerOptions).length === 0) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
json.modify(['angularCompilerOptions', 'extendedDiagnostics', 'checks', 'nullishCoalescingNotNullable'], 'suppress');
|
|
27
|
+
json.modify(['angularCompilerOptions', 'extendedDiagnostics', 'checks', 'optionalChainNotNullable'], 'suppress');
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.migrate = migrate;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @license Angular v22.0.0-next.10
|
|
4
|
+
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-DkkMibv-.cjs');
|
|
10
|
+
var jsonFile = require('./json-file-Drblb4E1.cjs');
|
|
11
|
+
var ts = require('typescript');
|
|
12
|
+
var path = require('node:path');
|
|
13
|
+
require('@angular-devkit/core');
|
|
14
|
+
require('node:os');
|
|
15
|
+
|
|
16
|
+
function getResolvedAngularCompilerOptions(tree, tsconfigPath) {
|
|
17
|
+
if (!tree.exists(tsconfigPath))
|
|
18
|
+
return {};
|
|
19
|
+
const sourceFile = ts.readJsonConfigFile(tsconfigPath, (path) => tree.readText(path));
|
|
20
|
+
const config = ts.convertToObject(sourceFile, []);
|
|
21
|
+
let angularOptions = config.angularCompilerOptions || {};
|
|
22
|
+
// Manually resolve inheritance for Angular-specific options.
|
|
23
|
+
// Since the TypeScript API doesn't perform a deep merge of custom/non-standard keys
|
|
24
|
+
// during config parsing, we must traverse the inheritance chain manually
|
|
25
|
+
if (config.extends) {
|
|
26
|
+
// Management extends property...
|
|
27
|
+
const parentPath = path.join(path.dirname(tsconfigPath), config.extends);
|
|
28
|
+
const parentOptions = getResolvedAngularCompilerOptions(tree, parentPath);
|
|
29
|
+
// Merge: the options of the current file overwrite those of the parent
|
|
30
|
+
angularOptions = {
|
|
31
|
+
...parentOptions,
|
|
32
|
+
...angularOptions,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return angularOptions;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Migration that adds `strictTemplates: false` to `tsconfig.json` files.
|
|
39
|
+
*/
|
|
40
|
+
function migrate() {
|
|
41
|
+
return async (tree) => {
|
|
42
|
+
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
43
|
+
const allPaths = [...new Set([...buildPaths, ...testPaths])];
|
|
44
|
+
for (const tsconfigPath of allPaths) {
|
|
45
|
+
const json = new jsonFile.jsonFileExports.JSONFile(tree, tsconfigPath);
|
|
46
|
+
const compilerOptions = json.get(['compilerOptions']);
|
|
47
|
+
if (!compilerOptions ||
|
|
48
|
+
typeof compilerOptions !== 'object' ||
|
|
49
|
+
Object.keys(compilerOptions).length === 0) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const angularOptions = getResolvedAngularCompilerOptions(tree, tsconfigPath);
|
|
53
|
+
if (angularOptions['strictTemplates'] !== undefined) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (json.get(['angularCompilerOptions', 'strictTemplates']) === undefined) {
|
|
57
|
+
json.modify(['angularCompilerOptions', 'strictTemplates'], false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
exports.migrate = migrate;
|
|
@@ -9,6 +9,31 @@
|
|
|
9
9
|
"version": "22.0.0",
|
|
10
10
|
"description": "Adds 'withXhr' to 'provideHttpClient' function calls when the 'HttpXhrBackend' is used. For more information see: https://angular.dev/api/common/http/withXhr",
|
|
11
11
|
"factory": "./bundles/http-xhr-backend.cjs#migrate"
|
|
12
|
+
},
|
|
13
|
+
"strict-templates-default": {
|
|
14
|
+
"version": "22.0.0",
|
|
15
|
+
"description": "Adds 'strictTemplates: false' in tsconfig.json when not set.",
|
|
16
|
+
"factory": "./bundles/strict-templates-default.cjs#migrate"
|
|
17
|
+
},
|
|
18
|
+
"can-match-snapshot-required": {
|
|
19
|
+
"version": "22.0.0",
|
|
20
|
+
"description": "Adds the required third argument to canMatch callsites.",
|
|
21
|
+
"factory": "./bundles/can-match-snapshot-required.cjs#migrate"
|
|
22
|
+
},
|
|
23
|
+
"incremental-hydration": {
|
|
24
|
+
"version": "22.0.0",
|
|
25
|
+
"description": "Adds withNoIncrementalHydration() opt out to provideClientHydration() when incremental hydration is not enabled to retain pre-v22 behavior-.",
|
|
26
|
+
"factory": "./bundles/incremental-hydration.cjs#migrate"
|
|
27
|
+
},
|
|
28
|
+
"strict-safe-navigation-narrow": {
|
|
29
|
+
"version": "22.0.0",
|
|
30
|
+
"description": "Disables the 'nullishCoalescingNotNullable & optionalChainNotNullable extended diagnostics.",
|
|
31
|
+
"factory": "./bundles/strict-safe-navigation-narrow.cjs#migrate"
|
|
32
|
+
},
|
|
33
|
+
"model-output": {
|
|
34
|
+
"version": "22.0.0",
|
|
35
|
+
"description": "Migrate broken duplicate outputs",
|
|
36
|
+
"factory": "./bundles/model-output.cjs#migrate"
|
|
12
37
|
}
|
|
13
38
|
}
|
|
14
39
|
}
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.10
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { OutputRef, OutputRefSubscription, DestroyRef, Signal,
|
|
7
|
+
import { OutputRef, OutputRefSubscription, DestroyRef, Signal, ValueEqualityFn, Injector, WritableSignal } from './_chrome_dev_tools_performance-chunk.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* An `OutputEmitterRef` is created by the `output()` function and can be
|
|
@@ -247,7 +247,7 @@ type ResourceLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<T>;
|
|
|
247
247
|
*
|
|
248
248
|
* @experimental
|
|
249
249
|
*/
|
|
250
|
-
type ResourceStreamingLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<Signal<ResourceStreamItem<T
|
|
250
|
+
type ResourceStreamingLoader<T, R> = (param: ResourceLoaderParams<R>) => Signal<ResourceStreamItem<T>> | PromiseLike<Signal<ResourceStreamItem<T>>> | undefined;
|
|
251
251
|
/**
|
|
252
252
|
* Options to the `resource` function, for creating a resource.
|
|
253
253
|
*
|
|
@@ -342,6 +342,24 @@ type ResourceSnapshot<T> = {
|
|
|
342
342
|
readonly status: 'error';
|
|
343
343
|
readonly error: Error;
|
|
344
344
|
};
|
|
345
|
+
/**
|
|
346
|
+
* Options for `debounced`.
|
|
347
|
+
*
|
|
348
|
+
* @see [Debouncing signals with `debounced`](guide/signals/debounced)
|
|
349
|
+
*/
|
|
350
|
+
interface DebouncedOptions<T> {
|
|
351
|
+
/** The `Injector` to use for the debounced resource. */
|
|
352
|
+
injector?: Injector;
|
|
353
|
+
/** The equality function to use for comparing values. */
|
|
354
|
+
equal?: ValueEqualityFn<T>;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Represents the wait condition for item debouncing.
|
|
358
|
+
* Can be a number of milliseconds or a function that returns a Promise.
|
|
359
|
+
*
|
|
360
|
+
* @see [Debouncing signals with `debounced`](guide/signals/debounced)
|
|
361
|
+
*/
|
|
362
|
+
type DebounceTimer<T> = number | ((value: T, lastValue: ResourceSnapshot<T>) => Promise<void> | void);
|
|
345
363
|
|
|
346
364
|
export { OutputEmitterRef, ResourceDependencyError, ResourceParamsStatus, getOutputDestroyRef, output };
|
|
347
|
-
export type { BaseResourceOptions, OutputOptions, PromiseResourceOptions, Resource, ResourceLoader, ResourceLoaderParams, ResourceOptions, ResourceParamsContext, ResourceRef, ResourceSnapshot, ResourceStatus, ResourceStreamItem, ResourceStreamingLoader, StreamingResourceOptions, WritableResource };
|
|
365
|
+
export type { BaseResourceOptions, DebounceTimer, DebouncedOptions, OutputOptions, PromiseResourceOptions, Resource, ResourceLoader, ResourceLoaderParams, ResourceOptions, ResourceParamsContext, ResourceRef, ResourceSnapshot, ResourceStatus, ResourceStreamItem, ResourceStreamingLoader, StreamingResourceOptions, WritableResource };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.10
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { SIGNAL } from './_formatter-chunk.js';
|
|
8
|
+
import * as _angular_core from '@angular/core';
|
|
8
9
|
import { EventContract } from './_event_dispatcher-chunk.js';
|
|
9
10
|
|
|
10
11
|
/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
|
|
@@ -741,7 +742,7 @@ declare abstract class Injector {
|
|
|
741
742
|
name?: string;
|
|
742
743
|
}): DestroyableInjector;
|
|
743
744
|
/** @nocollapse */
|
|
744
|
-
static ɵprov:
|
|
745
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<Injector>;
|
|
745
746
|
}
|
|
746
747
|
/**
|
|
747
748
|
* An Injector that the owner can destroy and trigger the DestroyRef.destroy hooks.
|
|
@@ -843,7 +844,7 @@ type TimeStampName = string;
|
|
|
843
844
|
type DevToolsColor = 'primary' | 'primary-light' | 'primary-dark' | 'secondary' | 'secondary-light' | 'secondary-dark' | 'tertiary' | 'tertiary-light' | 'tertiary-dark' | 'error';
|
|
844
845
|
declare global {
|
|
845
846
|
interface Console {
|
|
846
|
-
timeStamp(label: string, start: TimeStampName, end?: TimeStampName, trackName?: string, trackGroup?: string, color?: DevToolsColor): void;
|
|
847
|
+
timeStamp(label: string, start: TimeStampName, end?: TimeStampName, trackName?: string, trackGroup?: string, color?: DevToolsColor, detail?: object): void;
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
850
|
/**
|