Merge pull request #303 from Hexastack/301-bug-move-global-types-to-globaldts-file-human-version

fix(api): move types to global.d.ts
This commit is contained in:
Med Marrouchi 2024-11-01 09:00:35 +01:00 committed by GitHub
commit 4546e8e836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

3
api/src/global.d.ts vendored
View File

@ -6,6 +6,9 @@
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/ */
import '../types/event-emitter';
import '../types/express-session';
declare global { declare global {
type HyphenToUnderscore<S extends string> = S extends `${infer P}-${infer Q}` type HyphenToUnderscore<S extends string> = S extends `${infer P}-${infer Q}`
? `${P}_${HyphenToUnderscore<Q>}` ? `${P}_${HyphenToUnderscore<Q>}`

View File

@ -26,7 +26,6 @@
} }
}, },
"include": [ "include": [
"types/**/*.d.ts",
"src/global.d.ts", "src/global.d.ts",
"src/**/*.ts", "src/**/*.ts",
"src/**/*.json", "src/**/*.json",

View File

@ -6,7 +6,7 @@
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/ */
import { SubscriberStub } from './chat/schemas/subscriber.schema'; import { SubscriberStub } from '@/chat/schemas/subscriber.schema';
declare module 'express-session' { declare module 'express-session' {
interface SessionUser { interface SessionUser {