I want to publish my *.ts file on NPM, but it only contains type and interface definitions. There are no exported JavaScript functions or objects. Should I delete the "main": "index.js" entry in package.json and replace it with "main": "dist/types.ts" instead?
Do I need to compile my *.ts file to *.d.ts?
The types.js file includes:
export type Optional<T> = T|null|undefined
export type OptionalOrFalse<T> = Optional<T|false>
export type SingleOrArray<T> = T|T[]
export type DeepArray<T> = (T|DeepArray<T>)[]
export type SingleOrDeepArray<T> = T|DeepArray<T>
export type Factory<T> = () => T
export type ProductOrFactory<T> = T|Factory<T>
export type ProductOrFactoryDeepArray<T> = (ProductOrFactory<T> | ProductOrFactoryDeepArray<T>)[]
export type Dictionary<TValue> = { [key: string]: TValue }
export type ValueOf<TDictionary> = TDictionary[keyof TDictionary]
export type DictionaryOf<TDictionary> = Dictionary<ValueOf<TDictionary>>