-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: should export ContextDelegation and Context both (#7)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated import statements across various modules to use ES6 destructuring syntax. - Renamed `Context` to `ContextDelegation` for better clarity and consistency. - Changed class declarations from default exports to named exports. These changes help in improving code readability and maintainability but don't impact the end-user experience directly. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
5 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { expectType } from 'tsd'; | ||
import { Context } from '../src/index.js'; | ||
import { ContextDelegation } from '../src/index.js'; | ||
import Application from '../src/application.js'; | ||
|
||
const ctx = {} as Context; | ||
const ctx = {} as ContextDelegation; | ||
expectType<string>(ctx.ip); | ||
expectType<Application>(ctx.app); | ||
|
||
const app = {} as Application; | ||
expectType<string>(app.env); | ||
expectType<Context | undefined>(app.ctxStorage.getStore()); | ||
expectType<ContextDelegation | undefined>(app.ctxStorage.getStore()); |