warn.ts — vue Source File
Architecture documentation for warn.ts, a typescript file in the vue codebase. 0 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 4737f55f_f5f5_3f4a_4740_cc6b9e6f750a["warn.ts"] c9346cac_54e3_f6ca_68a7_03c6e82c9609["compileScript.ts"] c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 4737f55f_f5f5_3f4a_4740_cc6b9e6f750a style 4737f55f_f5f5_3f4a_4740_cc6b9e6f750a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
const hasWarned: Record<string, boolean> = {}
export function warnOnce(msg: string) {
const isNodeProd =
typeof process !== 'undefined' && process.env.NODE_ENV === 'production'
if (!isNodeProd && !hasWarned[msg]) {
hasWarned[msg] = true
warn(msg)
}
}
export function warn(msg: string) {
console.warn(
`\x1b[1m\x1b[33m[@vue/compiler-sfc]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`
)
}
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does warn.ts do?
warn.ts is a source file in the vue codebase, written in typescript. It belongs to the SfcCompiler domain, ScriptCompiler subdomain.
What functions are defined in warn.ts?
warn.ts defines 2 function(s): warn, warnOnce.
What files import warn.ts?
warn.ts is imported by 1 file(s): compileScript.ts.
Where is warn.ts in the architecture?
warn.ts is located at packages/compiler-sfc/src/warn.ts (domain: SfcCompiler, subdomain: ScriptCompiler, directory: packages/compiler-sfc/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free