Skip to content

Generic Type at runTime #92

@LotfiAghel

Description

@LotfiAghel

Describe the bug
the variable with type of generic Type doesn't work

The code causing the problem


interface IFoo<T> {}
class Foo<T> implements IFoo<T> {}

const foo = new Foo<number>();
console.log(getType(foo).name);//doesn't work and print "unknown" but should print "Foo" or something similar with c#

To Reproduce
Steps to reproduce the behavior:

  1. Build,
  2. run,
  3. see error...

Expected behavior
getType should return Type of variable with isGenericType==true and generic args [number]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions