Skip to content

Commit 2293b4d

Browse files
committed
fix cleanup function props test
1 parent f2f1d41 commit 2293b4d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.MD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ There is web-only feature: fix clicking on relative `import` paths.
116116

117117
(*enabled by default*)
118118

119-
Highlights and lifts non-function methods. Also applies for static class methods.
119+
Highlights non-function methods and properties. Also applies for static class methods.
120+
121+
![non-function-methods](media/non-function-methods.png)
120122

121123
### Indexed Signature Completions
122124

src/configurationType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export type Configuration = {
143143
*/
144144
'arrayMethodsSnippets.defaultItemName': string | false
145145
/**
146-
* Highlights non-function methods. Also applies for static class methods. Activates when `bind`, `call`, `caller` completions detected.
146+
* Highlights non-function methods. Also applies for static class methods. Activates when `bind`, `call`, `apply`, `arguments` completions detected.
147147
* @default true
148148
* */
149149
'highlightNonFunctionMethods.enable': boolean

typescript/src/completions/functionPropsAndMethods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default (entries: ts.CompletionEntry[]) => {
1212
}
1313

1414
const entryNames = new Set(entries.map(({ name, kind }) => (kind === ts.ScriptElementKind.warning ? '' : name)))
15-
if (['bind', 'call', 'caller'].every(name => entryNames.has(name)) && c('highlightNonFunctionMethods.enable')) {
15+
if (['bind', 'call', 'apply', 'arguments'].every(name => entryNames.has(name)) && c('highlightNonFunctionMethods.enable')) {
1616
const standardProps = new Set(['Symbol', 'apply', 'arguments', 'bind', 'call', 'caller', 'length', 'name', 'prototype', 'toString'])
1717
entries = entries.map(entry => {
1818
if (!standardProps.has(entry.name) && entry.kind !== ts.ScriptElementKind.warning) {

0 commit comments

Comments
 (0)