Skip to content

Commit

Permalink
Update scope type to accept custom scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
guyca committed Dec 20, 2024
1 parent 7cd6950 commit 109a330
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-obsidian/src/decorators/LifecycleBound.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type Options = {
scope?: 'component' | 'feature';
scope?: 'component' | 'feature' | (string & {});
};

export function LifecycleBound(options?: Options) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable unused-imports/no-unused-vars */
import { LifecycleBound, ObjectGraph } from 'src';

describe('custom scoped lifecycle-bound graphs', () => {
it('should be able to use a custom scoped lifecycle-bound graph', () => {
@LifecycleBound({scope: 'customScope'})
class Temp extends ObjectGraph {
}
});
});

0 comments on commit 109a330

Please sign in to comment.