Closed buschtoens closed 5 years ago
The generated index.d.ts
looks like this:
export function gte(version: string): boolean;
export function lte(version: string): boolean;
export const HAS_UNDERSCORE_ACTIONS: boolean;
export const HAS_MODERN_FACTORY_INJECTIONS: boolean;
export const HAS_DESCRIPTOR_TRAP: boolean;
export const HAS_NATIVE_COMPUTED_GETTERS: boolean;
export const IS_GLIMMER_2: boolean;
export const IS_RECORD_DATA: boolean;
export const SUPPORTS_FACTORY_FOR: boolean;
export const SUPPORTS_GET_OWNER: boolean;
export const SUPPORTS_SET_OWNER: boolean;
export const SUPPORTS_NEW_COMPUTED: boolean;
export const SUPPORTS_INVERSE_BLOCK: boolean;
export const SUPPORTS_CLOSURE_ACTIONS: boolean;
export const SUPPORTS_UNIQ_BY_COMPUTED: boolean;
Should the generated types be included? Or is that done only on publish?
I've added /index.d.ts
to the .gitignore
to avoid having out of date / mismatching types in the repo, that would get overridden during publishing, because someone forgot to run a script. 😄
This PR extracts the flags definitions for the debug plugin into a separate file, so that a TypeScript declaration file can be generated from them in the
prepack
step, that is executed right before the addon is published to npm.