feat(core): pass name to `createContextToken` factory
MODIFY
packages/core/src/context/context.token.factory.ts
packages/core/src/context/context.token.factory.ts
@@ -3,7 +3,10 @@ import * as uuid from 'uuid';
export class ContextToken<T = any> {
_id = uuid();
_T!: T;
+ constructor(public name?: string) {}
}
-export const createContextToken = <T>() =>
- new class extends ContextToken<T> {};
+export const createContextToken = <T>(name?: string) =>
+ new class extends ContextToken<T> {
+ constructor() { super(name); }
+ };

feat(core): pass name to `createContextToken` factory