The TypeScript code string from which types should be stripped.
The provided code string with all TypeScript types removed.
This function is useful when you want to remove TypeScript types from a code string.
const code = [
'/**',
' * @returns {string} a string',
' */',
//
].join('\n')
const actual = tsDocStripTypesAndDefaults(code)
const expected = [
'/**',
' * @returns a string',
' */',
//
].join('\n')
Generated using TypeDoc
Strips JSDoc style types and default values from the provided code.