@typescript-rtti/reflect
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

reflect

Version CircleCI

Unified Reflection

This is a project to separate typescript-rtti's reflection library into an independent library and implement other metadata formats. Currently supports emitDecoratorMetadata and typescript-rtti.

Usage

npm install @typescript-rtti/reflect

Traditional metadata (emitDecoratorMetadata):

import { reflect } from '@typescript-rtti/reflect';

@dec() class A { 
    constructor(str : string, num : number) {
    }
}

expect(reflect(A).parameters[0].type.isClass(String)).to.be.true;

typescript-rtti

import { reflect } from '@typescript-rtti/reflect';

class A {
    constructor(str : string, num : number) {
    }
}

expect(reflect(A).parameters[0].type.isClass(String)).to.be.true;

Package Sidebar

Install

npm i @typescript-rtti/reflect

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

611 kB

Total Files

90

Last publish

Collaborators

  • rezonant