MCPcopy Index your code
hub / github.com/webpack/webpack / stripTypes

Function stripTypes

lib/typescript/TypeScriptPlugin.js:125–135  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

123 * @returns {string} stripped JS
124 */
125const stripTypes = (input) => {
126 try {
127 // Pass only `mode`. `sourceUrl` would emit a `//# sourceURL=…` pragma
128 // into the output (V8 debugger hint), and `sourceMap: true` is
129 // rejected in strip mode — we build the source map by hand instead.
130 // eslint-disable-next-line n/no-unsupported-features/node-builtins
131 return mod.stripTypeScriptTypes(input, { mode: "strip" });
132 } catch (err) {
133 throw new ModuleBuildError(/** @type {Error} */ (err));
134 }
135};
136
137/**
138 * Coerce a Buffer-or-string source to a UTF-8 string, dropping any BOM.

Callers 1

_processResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected