@lls/typings 24.13.0 → 24.14.0-01a136ea
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overrides/global.d.ts +9 -0
- package/overrides/window.d.ts +1 -0
- package/package.json +1 -1
- package/react-router.d.ts +4 -0
- package/utils.d.ts +7 -0
package/overrides/global.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Polypad as PolypadType } from '@typings/polypad'
|
|
2
|
+
import type { AnyFunction, TODO } from '@typings/utils'
|
|
2
3
|
import type CheerioModule from 'cheerio'
|
|
3
4
|
|
|
4
5
|
declare global {
|
|
@@ -26,4 +27,12 @@ declare global {
|
|
|
26
27
|
CONF_ENV: 'local' | 'development' | 'test' | 'preprod' | 'production' | 'prod'
|
|
27
28
|
}
|
|
28
29
|
}
|
|
30
|
+
var bun: {
|
|
31
|
+
mockAll: AnyFunction
|
|
32
|
+
mockKeys: (keys: string[]) => (importActual: () => Promise<unknown>) => Promise<unknown>
|
|
33
|
+
mockRestore: AnyFunction
|
|
34
|
+
mocked: <T>(t: T) => TODO
|
|
35
|
+
mockCustom: <T, U>(fn: (T) => U) => (t: T) => U
|
|
36
|
+
unmockAll: AnyFunction
|
|
37
|
+
}
|
|
29
38
|
}
|
package/overrides/window.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ interface Window {
|
|
|
15
15
|
setUser?: (user_id: TPianoOpts['user_id'], user_category: TPianoOpts['user_category']) => void
|
|
16
16
|
}
|
|
17
17
|
sendEvent?: (name: string, opts: TPianoOpts) => void
|
|
18
|
+
getVisitorId: () => number
|
|
18
19
|
}
|
|
19
20
|
playwrightInplaceNavigate: (value: string) => void
|
|
20
21
|
playwrightStoryId: string
|
package/package.json
CHANGED
package/utils.d.ts
CHANGED
|
@@ -18,3 +18,10 @@ export type AllowUndefined<T> = T extends object
|
|
|
18
18
|
: T extends infer U
|
|
19
19
|
? undefined | U
|
|
20
20
|
: T
|
|
21
|
+
|
|
22
|
+
// see https://stackoverflow.com/questions/57683303/how-can-i-see-the-full-expanded-contract-of-a-typescript-type
|
|
23
|
+
export type Expand<T> = T extends (...args: infer A) => infer R
|
|
24
|
+
? (...args: Expand<A>) => Expand<R>
|
|
25
|
+
: T extends infer O
|
|
26
|
+
? { [K in keyof O]: O[K] }
|
|
27
|
+
: never
|