Comparing version 3.3.1 to 3.4.0
@@ -17,3 +17,2 @@ import 'reflect-metadata'; | ||
propertyName, | ||
designTypeName: designType.name, | ||
key, | ||
@@ -20,0 +19,0 @@ }); |
@@ -29,4 +29,3 @@ export type Constructor<T> = { | ||
propertyName: string; | ||
designTypeName: string; | ||
key: string; | ||
} |
{ | ||
"name": "mesh-ioc", | ||
"version": "3.3.1", | ||
"version": "3.4.0", | ||
"description": "Powerful and Lightweight IoC Library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -20,5 +20,17 @@ # Mesh IoC | ||
## Prerequisites | ||
Make sure `tsconfig.json` contains the following: | ||
``` | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"useDefineForClassFields": false, | ||
``` | ||
## API Cheatsheet | ||
```ts | ||
import { Mesh, dep } from 'mesh-ioc'; | ||
// Mesh is an IoC container that stores service bindings and instantiated objects | ||
@@ -397,4 +409,12 @@ const mesh = new Mesh('someName'); | ||
## TypeScript Decorators | ||
This library is designed to work with [TypeScript stage-2 Experimental Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) and emitted metadata to facilitate some of the features. | ||
TypeScript 5.0 implementes [stage-3 ECMAScript decorators](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#decorators) which is largely incompatible with Mesh. | ||
We have not yet looked at migrating to ECMAScript decorators, but it is likely that migrating to them will be a breaking change. For now, please stick with `experimentalDecorators: true` as mentioned in [prerequisited](#prerequisites). | ||
## License | ||
[ISC](https://en.wikipedia.org/wiki/ISC_license) Β© Boris Okunskiy |
Sorry, the diff of this file is not supported yet
39663
419
377