Open
Description
Current dynamic type chains
Native lib types: lib/<name>/api.js
=> lib/apis.all.d.ts
=> globals.d.ts
Imports: <some path>.d.ts
or <some path>.js
Current type generation file
lib/types.js
Wants:
- 1. Self-sufficient single
globals.d.ts
: - 1.1. Autogenerated static interfaces for Native libs (https://github.com/lostrepo/lo/tree/feat/static/typegen | standalone globals.d.ts: lo lib/test.js > globals.d.ts)
- 1.2. Manual
declare "lib/<name>.js" { ... }
types forlib/<name>.js
- 2.
Debatable
. Current Native lib types chain withoutlib/apis.all.d.ts
on top of(1)
. Replacement types, not overrides. For real-time types during development phase of Native lib api forlo
or user project. Ideally need this feature to picklib/<name>/api.js
withlo.load/lo.library(<name>)
so won't need to search file system for relevant names beforehand - 3.
globals.d.ts
segments: - 3.1. User types
- 3.2.
(1.2)
- 3.3. Base types
- 3.4.
(1.1)
and other autogenerated stuff - 3.5.
(2)
. Generate segment usinglo type <config.js path> --dev
or something like that. Empty as first step before build (maybe just find offset to exclude segment from embed). Expose relevant method(s) inlib/types.js