Skip to content

Commit 91da22c

Browse files
committed
Revert "method-snippets: don't activate in typeof"
This reverts commit f5cfb09.
1 parent f5cfb09 commit 91da22c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

typescript/src/constructMethodSnippet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { findChildContainingExactPosition } from './utils'
55

66
export default (languageService: ts.LanguageService, sourceFile: ts.SourceFile, position: number, c: GetConfig) => {
77
const node = findChildContainingExactPosition(sourceFile, position)
8-
if (!node || isTypeNode(node) || tsFull.isPartOfTypeQuery(node as any)) return
8+
if (!node || isTypeNode(node)) return
99

1010
const checker = languageService.getProgram()!.getTypeChecker()!
1111
const type = checker.getTypeAtLocation(node)

typescript/test/completions.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ describe('Method snippets', () => {
123123
124124
declare const a: A
125125
a/*2*/
126-
type B1 = typeof a/*7*/;
127126
128127
// overload
129128
function foo(this: {}, a)
@@ -170,7 +169,6 @@ describe('Method snippets', () => {
170169
compareMethodSnippetAgainstMarker(markers, 4, '($b)')
171170
compareMethodSnippetAgainstMarker(markers, 5, '(a, b, { d, e: {} }, ...c)')
172171
compareMethodSnippetAgainstMarker(markers, 6, '(a, b, c)')
173-
compareMethodSnippetAgainstMarker(markers, 7, null)
174172
})
175173

176174
test('Skip trailing void', () => {

0 commit comments

Comments
 (0)