Open alexxxkny opened 1 year ago
Not sure there is any solution. (Even in the definitions themeselves, there are sometimes no types, e.g. just RPC/runtime, for those a phantom is add to the contained types.ts
, e.g. see https://github.com/polkadot-js/api/blob/master/packages/types/src/interfaces/aura/types.ts#L11)
Happy to accept PRs that cater for empty,
At worst, I suppose the root types.hbs
can just get a PHANTOM_GERERATED_<Date.now()>
export. Hacky in the same vein as those above and should not create any conflicts. (Not entirely sure how that translated to the handlebars template lange, we potentially need to pass something additional through to the template on generation)
src/interfaces/definitions.ts
andsrc/interfaces/<module>/definitions.ts
. But when you not - you get emptytypes.ts
and this occurs a compilation error as emptytypes.ts
is not a module but re-exported inindex.ts
this wayexport * from './types'
. It works fine if you addexport {}
totypes.ts
, but doing this manually every time is not an option. Also you could add fake module without actual definitions like this// src/interfaces/definitions.ts export {default as module} from './module/definitions'