MCPcopy
hub / github.com/webpack/webpack / renderConst

Method renderConst

lib/RuntimeTemplate.js:254–256  ·  view source on GitHub ↗

* Renders return const when it is supported, otherwise let when supported, otherwise var. * @returns {"const" | "let" | "var"} return `const` when it is supported, otherwise `let` when supported, otherwise `var`

()

Source from the content-addressed store, hash-verified

252 * @returns {"const" | "let" | "var"} return `const` when it is supported, otherwise `let` when supported, otherwise `var`
253 */
254 renderConst() {
255 return this.supportsConst() ? "const" : this.supportsLet() ? "let" : "var";
256 }
257
258 /**
259 * Renders return let when it is supported, otherwise var.

Callers 15

weakErrorMethod · 0.95
getSyncSourceMethod · 0.80
getWeakSyncSourceMethod · 0.80
getAsyncWeakSourceMethod · 0.80
getEagerSourceMethod · 0.80
getLazyOnceSourceMethod · 0.80
getLazySourceMethod · 0.80

Calls 2

supportsConstMethod · 0.95
supportsLetMethod · 0.95

Tested by

no test coverage detected