@lls/typings 24.12.0 → 24.13.0-004ada9b

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/button.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type OnGoToType = (props: {
2
+ href?: string | URL
3
+ page?: number
4
+ doc?: string
5
+ target?: string
6
+ quiz?: string
7
+ }) => void
@@ -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.12.0",
3
+ "version": "24.13.0-004ada9b",
4
4
  "description": "types custom du monorepo",
5
5
  "main": "index.js",
6
6
  "keywords": [],
@@ -8,11 +8,11 @@
8
8
  "license": "ISC",
9
9
  "devDependencies": {
10
10
  "@types/domhandler": "2.4.5",
11
- "@types/lodash": "4.17.13",
11
+ "@types/lodash": "4.17.14",
12
12
  "@types/react": "18.3.12",
13
13
  "@yorab/react-paint": "0.11.4",
14
14
  "cheerio": "1.0.0",
15
- "typescript": "5.6.3"
15
+ "typescript": "5.7.3"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "@biomejs/biome": "*"
@@ -23,6 +23,7 @@ export type PresentationPropsType = {
23
23
  rightDocZoomProps?: ZoomPropsType
24
24
  isLaserCursor?: boolean
25
25
  setIsLaserCursor?: ReactSetState<boolean>
26
+ boardId?: string | undefined
26
27
  showHomo?: boolean
27
28
  setShowHomo?: (homo: boolean) => void
28
29
  openProjectorView?: () => void
@@ -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