Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime TypeScript interfaces type checking in tests #1

Closed
davidrapin opened this issue May 11, 2016 · 8 comments
Closed

Runtime TypeScript interfaces type checking in tests #1

davidrapin opened this issue May 11, 2016 · 8 comments

Comments

@davidrapin
Copy link
Contributor

Possible solutions: http://angular.github.io/assert/

Interesting discussion about dynamic type checking is TS: https://typescript.codeplex.com/discussions/401501

A possible implementation of an interface checker in TS: (scroll down to CheckInterface): https://blorkfish.wordpress.com/2012/10/17/typescript-implementing-a-simple-ioc-container-for-service-location/

@maxime-allex

This comment has been minimized.

@davidrapin

This comment has been minimized.

@davidrapin

This comment has been minimized.

@davidrapin

This comment has been minimized.

@maxime-allex

This comment has been minimized.

@maxime-allex

This comment has been minimized.

@davidrapin

This comment has been minimized.

@davidrapin
Copy link
Contributor Author

Actually, this seems our best option:

  1. let TS compiler generate reflection decoration (Emit serialized design-time type metadata for decorators microsoft/TypeScript#2577 using "emitDecoratorMetadata"
  2. use the generated  __metadata fields to read type information at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants