UNPKG

optimizely-oui

Version:

Optimizely's Component Library.

18 lines (9 loc) 876 B
## ʦ Typescript Types Types are auto generated using the Typescript CLI (`tsc`) and appended to the root template file (`templates/module-declaration.d.ts`) to generate the complete public facing type definition file (`index.d.ts`) The concatenation process is necessary to provide a named export interface (similar to `src/main.js`) with autogenerated module definitions per file (generated by the `tsc` CLI). See `yarn generate-types` for the commands we run to auto generate `index.d.ts` I'd love if there was a cleaner way to do this! ## Adding or Updating Types DO NOT MODIFY `index.d.ts` directly! It is an autogenerated file per above. To add/edit component definitions, you should only change the module definition template (`templates/module-declaration.d.ts`). `oui.d.ts` contains Typescript definitions specifically necessary for working inside this repo.