WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/config/target.js
@@ -12,6 +12,7 @@
);
/**
 * Gets default target.
 * @param {string} context the context directory
 * @returns {string} default target
 */
@@ -21,6 +22,7 @@
};
/**
 * Defines the platform target properties type used by this module.
 * @typedef {object} PlatformTargetProperties
 * @property {boolean | null=} web web platform, importing of http(s) and std: is available
 * @property {boolean | null=} browser browser platform, running in a normal web browser
@@ -31,6 +33,7 @@
 */
/**
 * Defines the electron context target properties type used by this module.
 * @typedef {object} ElectronContextTargetProperties
 * @property {boolean | null} electronMain in main context
 * @property {boolean | null} electronPreload in preload context
@@ -38,6 +41,7 @@
 */
/**
 * Defines the api target properties type used by this module.
 * @typedef {object} ApiTargetProperties
 * @property {boolean | null} require has require function available
 * @property {boolean | null} nodeBuiltins has node.js built-in modules available
@@ -51,10 +55,12 @@
 */
/**
 * Defines the ecma target properties type used by this module.
 * @typedef {object} EcmaTargetProperties
 * @property {boolean | null} globalThis has globalThis variable available
 * @property {boolean | null} bigIntLiteral big int literal syntax is available
 * @property {boolean | null} const const and let variable declarations are available
 * @property {boolean | null} methodShorthand object method shorthand is available
 * @property {boolean | null} arrowFunction arrow functions are available
 * @property {boolean | null} forOf for of iteration is available
 * @property {boolean | null} destructuring destructuring is available
@@ -67,11 +73,13 @@
 */
/**
 * Defines the shared type used by this module.
 * @template T
 * @typedef {{ [P in keyof T]?: never }} Never<T>
 */
/**
 * Defines the shared type used by this module.
 * @template A
 * @template B
 * @typedef {(A & Never<B>) | (Never<A> & B) | (A & B)} Mix<A, B>
@@ -80,6 +88,7 @@
/** @typedef {Mix<Mix<PlatformTargetProperties, ElectronContextTargetProperties>, Mix<ApiTargetProperties, EcmaTargetProperties>>} TargetProperties */
/**
 * Returns check if version is greater or equal.
 * @param {string} major major version
 * @param {string | undefined} minor minor version
 * @returns {(vMajor: number, vMinor?: number) => boolean | undefined} check if version is greater or equal
@@ -192,6 +201,7 @@
            const: v(6),
            templateLiteral: v(4),
            optionalChaining: v(14),
            methodShorthand: v(4),
            arrowFunction: v(6),
            asyncFunction: v(7, 6),
            forOf: v(5),
@@ -240,6 +250,7 @@
            const: v(1, 1),
            templateLiteral: v(1, 1),
            optionalChaining: v(8),
            methodShorthand: v(1, 1),
            arrowFunction: v(1, 1),
            asyncFunction: v(1, 7),
            forOf: v(0, 36),
@@ -278,6 +289,7 @@
            const: v(0, 15),
            templateLiteral: v(0, 13),
            optionalChaining: v(0, 44),
            methodShorthand: v(0, 15),
            arrowFunction: v(0, 15),
            asyncFunction: v(0, 21),
            forOf: v(0, 13),
@@ -300,6 +312,7 @@
            const: v >= 2015,
            templateLiteral: v >= 2015,
            optionalChaining: v >= 2020,
            methodShorthand: v >= 2015,
            arrowFunction: v >= 2015,
            forOf: v >= 2015,
            destructuring: v >= 2015,
@@ -315,6 +328,7 @@
];
/**
 * Gets target properties.
 * @param {string} target the target
 * @param {string} context the context directory
 * @returns {TargetProperties} target properties
@@ -336,6 +350,7 @@
};
/**
 * Merges target properties.
 * @param {TargetProperties[]} targetProperties array of target properties
 * @returns {TargetProperties} merged target properties
 */
@@ -372,6 +387,7 @@
};
/**
 * Gets targets properties.
 * @param {string[]} targets the targets
 * @param {string} context the context directory
 * @returns {TargetProperties} target properties