stripInternalTypes() — vite Function Reference
Architecture documentation for the stripInternalTypes() function in rolldown.dts.config.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9["stripInternalTypes()"] c2239521_b59e_589c_03c3_99028d5442bd["rolldown.dts.config.ts"] fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9 -->|defined in| c2239521_b59e_589c_03c3_99028d5442bd 57d090ac_29ba_81ff_ad7b_2772f6d11490["removeInternal()"] fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9 -->|calls| 57d090ac_29ba_81ff_ad7b_2772f6d11490 style fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/rolldown.dts.config.ts lines 354–378
function stripInternalTypes(this: PluginContext, chunk: OutputChunk) {
if (chunk.code.includes('@internal')) {
const s = new MagicString(chunk.code)
// need to parse with babel to get the comments
const ast = parseWithBabel(chunk.code, {
plugins: ['typescript'],
sourceType: 'module',
})
walk(ast as any, {
enter(node: any) {
if (removeInternal(s, node)) {
this.skip()
}
},
})
chunk.code = s.toString()
if (chunk.code.includes('@internal')) {
this.warn(`${chunk.fileName} has unhandled @internal declarations`)
process.exitCode = 1
}
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does stripInternalTypes() do?
stripInternalTypes() is a function in the vite codebase, defined in packages/vite/rolldown.dts.config.ts.
Where is stripInternalTypes() defined?
stripInternalTypes() is defined in packages/vite/rolldown.dts.config.ts at line 354.
What does stripInternalTypes() call?
stripInternalTypes() calls 1 function(s): removeInternal.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free