Skip to content

Commit f761113

Browse files
committed
Add unit test to confirm support for generics in constructor args
1 parent 2b1fbe9 commit f761113

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parse/ParameterLoader.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,11 @@ export interface A{
951951
.toEqual({ type: 'interface', value: 'MyClass' });
952952
});
953953

954+
it('should get the range of a generic class', async() => {
955+
expect(await getFieldRange('fieldA: MyClass<T>', {}))
956+
.toEqual({ type: 'interface', value: 'MyClass' });
957+
});
958+
954959
it('should get the range of a hash', async() => {
955960
expect(await getFieldRange('fieldA: { a: number }', {}))
956961
.toMatchObject({

0 commit comments

Comments
 (0)