codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

Type parameters are not properly respected #142

Closed SpaceviewMob closed 7 years ago

SpaceviewMob commented 8 years ago

Input:

type EntitiesByKey<TEntity> = { [key: string]: TEntity };

function doSomething<TEntity>(entities: EntitiesByKey<TEntity>) {
    console.log(entities);
}

doSomething({});

Result: ReferenceError: TEntity is not defined

vegansk commented 7 years ago

@phpnode, are there any chances for this bug to be fixed?

phpnode commented 7 years ago

Hi sorry for the delay, this project is now deprecated in favour of flow-runtime which aims for full flow compatibility. flow-runtime has full support for type parameters.