diff --git a/README.md b/README.md index 2648241..b929d5a 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,7 @@ Usage ----- ```ts -import { Reflection as Reflect } from '@abraham/reflection'; -Reflect.defineMetadata(metadataKey, metadataValue, target); -``` - -If you want a globally available version. - -```ts -import '@abraham/reflection/dist/reflect'; +import '@abraham/reflection'; Reflect.defineMetadata(metadataKey, metadataValue, target); ``` diff --git a/src/index.test.ts b/src/index.test.ts index 9dccd50..a0da0de 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -15,3 +15,11 @@ test('decorate', () => { test('metadata', () => { expect(Reflect.metadata).toBeDefined(); }); + +test('hasOwnMetadata', () => { + expect(Reflect.hasOwnMetadata).toBeDefined(); +}); + +test('getOwnMetadata', () => { + expect(Reflect.getOwnMetadata).toBeDefined(); +}); diff --git a/src/reflect.test.ts b/src/reflect.test.ts deleted file mode 100644 index 986b1b5..0000000 --- a/src/reflect.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import './reflect'; - -test('defineMetadata', () => { - expect(Reflect.defineMetadata).toBeDefined(); -}); - -test('getMetadata', () => { - expect(Reflect.getMetadata).toBeDefined(); -}); - -test('decorate', () => { - expect(Reflect.decorate).toBeDefined(); -}); - -test('metadata', () => { - expect(Reflect.metadata).toBeDefined(); -}); - -test('hasOwnMetadata', () => { - expect(Reflect.hasOwnMetadata).toBeDefined(); -}); - -test('getOwnMetadata', () => { - expect(Reflect.getOwnMetadata).toBeDefined(); -}); diff --git a/src/reflect.ts b/src/reflect.ts deleted file mode 100644 index 2ee4ab5..0000000 --- a/src/reflect.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Reflection } from './index'; - -// TODO: Is there a better way to do this? -declare global { - interface Window { - Reflect: any; - } -} - -window.Reflect = Reflection;