File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
typescript/src/completions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export default (prior: ts.CompletionInfo): ts.CompletionEntry[] | void => {
22
22
if ( ! objType ) return
23
23
oldProperties = getAllPropertiesOfType ( objType , typeChecker )
24
24
}
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 ) {
27
27
let type : ts . Type | undefined
28
28
if ( ! isTs5 ( ) ) {
29
29
const property = oldProperties ! . find ( property => property . name === entry . name )
@@ -70,6 +70,7 @@ export default (prior: ts.CompletionInfo): ts.CompletionEntry[] | void => {
70
70
const index = entries . indexOf ( entry )
71
71
entries . splice ( index + ( keepOriginal === 'before' ? 1 : 0 ) , keepOriginal === 'remove' ? 1 : 0 , {
72
72
...entry ,
73
+ name : entry . name . replace ( / \$ / g, '\\$' ) ,
73
74
// todo setting incompatible!!!
74
75
sortText : entry . sortText ,
75
76
labelDetails : {
You can’t perform that action at this time.
0 commit comments