Open 0x53A opened 5 years ago
Record is apparently a TS native Dictionary type:
https://www.rickcarlino.com/2017/02/27/real-world-use-case-for-typescript-record-types.html
The plugin stuff may be solvable with anonymous records:
// types/options.d.ts
export declare type Plugin<E = {}> = (fp: Instance & E) => Options;
// plugins/weekSelect/weekSelect.d.ts
import { Plugin } from "../../types/options";
export declare type PlusWeeks = {
weekStartDay: Date;
weekEndDay: Date;
};
declare function weekSelectPlugin(): Plugin<PlusWeeks>;
would need to generate a new anonymous record combining the fields of Instance & E: (fp: Instance & E)
arrayify just needs the braces dropped:
The generated Options type is useless and would need support for Partial (which at first glance doesn't seem too hard)
I'll (probably, don't depend on it ...) try to fix it myself when I have some time, in a month or two.
0) Note: the documentation for -e could be improved, I didn't realize at first that I could add the package name of the first package.
1) missing generic params
2) missing type
Record<'X, 'Y>
3) invalid generics
4) duplicated entries in enum