mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
refactor(@ngtools/webpack): add types to exported module variables
Adding explicit type information for a module's exported variables allows the `@ngtools/webpack` package to be built with the `isolatedDeclarations` option.
This commit is contained in:
parent
23ebfd9440
commit
e5368b8ca3
@ -9,4 +9,4 @@
|
|||||||
export { angularWebpackLoader as default } from './loader';
|
export { angularWebpackLoader as default } from './loader';
|
||||||
export { type AngularWebpackPluginOptions, AngularWebpackPlugin, imageDomains } from './plugin';
|
export { type AngularWebpackPluginOptions, AngularWebpackPlugin, imageDomains } from './plugin';
|
||||||
|
|
||||||
export const AngularWebpackLoaderPath = __filename;
|
export const AngularWebpackLoaderPath: string = __filename;
|
||||||
|
@ -34,7 +34,7 @@ function externalizeForWindows(path: string): string {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const externalizePath = (() => {
|
export const externalizePath: typeof externalizeForWindows = (() => {
|
||||||
if (process.platform !== 'win32') {
|
if (process.platform !== 'win32') {
|
||||||
return (path: string) => path;
|
return (path: string) => path;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ import { createAotTransformers, createJitTransformers, mergeTransformers } from
|
|||||||
*/
|
*/
|
||||||
const DIAGNOSTICS_AFFECTED_THRESHOLD = 1;
|
const DIAGNOSTICS_AFFECTED_THRESHOLD = 1;
|
||||||
|
|
||||||
export const imageDomains = new Set<string>();
|
export const imageDomains: Set<string> = new Set();
|
||||||
|
|
||||||
export interface AngularWebpackPluginOptions {
|
export interface AngularWebpackPluginOptions {
|
||||||
tsconfig: string;
|
tsconfig: string;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.dev/license
|
* found in the LICENSE file at https://angular.dev/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const AngularPluginSymbol = Symbol.for('@ngtools/webpack[angular-compiler]');
|
export const AngularPluginSymbol: unique symbol = Symbol.for('@ngtools/webpack[angular-compiler]');
|
||||||
|
|
||||||
export interface EmitFileResult {
|
export interface EmitFileResult {
|
||||||
content?: string;
|
content?: string;
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
import type { Compilation, LoaderContext } from 'webpack';
|
import type { Compilation, LoaderContext } from 'webpack';
|
||||||
|
|
||||||
export const InlineAngularResourceLoaderPath = __filename;
|
export const InlineAngularResourceLoaderPath: string = __filename;
|
||||||
|
|
||||||
export const InlineAngularResourceSymbol = Symbol('@ngtools/webpack[angular-resource]');
|
export const InlineAngularResourceSymbol: unique symbol = Symbol(
|
||||||
|
'@ngtools/webpack[angular-resource]',
|
||||||
|
);
|
||||||
|
|
||||||
export interface CompilationWithInlineAngularResource extends Compilation {
|
export interface CompilationWithInlineAngularResource extends Compilation {
|
||||||
[InlineAngularResourceSymbol]: string;
|
[InlineAngularResourceSymbol]: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user