File tree Expand file tree Collapse file tree
typescript/src/completions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export default (prior: ts.CompletionInfo): ts.CompletionEntry[] | void => {
2222 if ( ! objType ) return
2323 oldProperties = getAllPropertiesOfType ( objType , typeChecker )
2424 }
25- // eslint-disable-next-line unicorn/no-useless-spread
26- for ( const entry of [ ... entries ] ) {
25+ const clonedEntries = [ ... entries ]
26+ for ( const entry of clonedEntries ) {
2727 let type : ts . Type | undefined
2828 if ( ! isTs5 ( ) ) {
2929 const property = oldProperties ! . find ( property => property . name === entry . name )
@@ -70,6 +70,7 @@ export default (prior: ts.CompletionInfo): ts.CompletionEntry[] | void => {
7070 const index = entries . indexOf ( entry )
7171 entries . splice ( index + ( keepOriginal === 'before' ? 1 : 0 ) , keepOriginal === 'remove' ? 1 : 0 , {
7272 ...entry ,
73+ name : entry . name . replace ( / \$ / g, '\\$' ) ,
7374 // todo setting incompatible!!!
7475 sortText : entry . sortText ,
7576 labelDetails : {
You can’t perform that action at this time.
0 commit comments