@lls/typings 24.13.0-e5d38964 → 24.13.0-ecc2e93d

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.
@@ -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
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lls/typings",
3
- "version": "24.13.0-e5d38964",
3
+ "version": "24.13.0-ecc2e93d",
4
4
  "description": "types custom du monorepo",
5
5
  "main": "index.js",
6
6
  "keywords": [],
@@ -0,0 +1,4 @@
1
+ import type { AnyFunction } from './utils'
2
+
3
+ // see cowboys of 2023 https://github.com/DefinitelyTyped/DefinitelyTyped/issues/50526
4
+ export type History = { push: AnyFunction }
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