removeInternal() — vite Function Reference
Architecture documentation for the removeInternal() function in rolldown.dts.config.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 57d090ac_29ba_81ff_ad7b_2772f6d11490["removeInternal()"] c2239521_b59e_589c_03c3_99028d5442bd["rolldown.dts.config.ts"] 57d090ac_29ba_81ff_ad7b_2772f6d11490 -->|defined in| c2239521_b59e_589c_03c3_99028d5442bd fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9["stripInternalTypes()"] fe42fa4f_2882_53e3_9e2f_b59c7e2ef9f9 -->|calls| 57d090ac_29ba_81ff_ad7b_2772f6d11490 style 57d090ac_29ba_81ff_ad7b_2772f6d11490 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/rolldown.dts.config.ts lines 384–404
function removeInternal(s: MagicString, node: any): boolean {
if (
node.leadingComments &&
node.leadingComments.some((c: any) => {
return c.type === 'CommentBlock' && c.value.includes('@internal')
})
) {
// Examples:
// function a(foo: string, /* @internal */ bar: number, baz: boolean)
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// type Enum = Foo | /* @internal */ Bar | Baz
// ^^^^^^^^^^^^^^^^^^^^^
// strip trailing comma or pipe
const trailingRe = /\s*[,|]/y
trailingRe.lastIndex = node.end
const trailingStr = trailingRe.exec(s.original)?.[0] ?? ''
s.remove(node.leadingComments[0].start, node.end + trailingStr.length)
return true
}
return false
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does removeInternal() do?
removeInternal() is a function in the vite codebase, defined in packages/vite/rolldown.dts.config.ts.
Where is removeInternal() defined?
removeInternal() is defined in packages/vite/rolldown.dts.config.ts at line 384.
What calls removeInternal()?
removeInternal() is called by 1 function(s): stripInternalTypes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free