I try to create vue-moment's definition file, it compiles perfectly in IntelliJ but with vue-cli build, i get:
This dependency was not found:
* vue-moment in ./src/main.ts
added to package.json:
"types": "types/index.d.ts",
main.ts
import VueMoment from 'vue-moment';
Vue.use(VueMoment);
index.d.ts:
import Vue, {PluginFunction} from 'vue';
import moment from 'moment';
export interface VueMoment {
install: PluginFunction<never>;
}
declare const VueMoment: VueMoment;
export default VueMoment;
declare module 'vue/types/vue' {
interface Vue {
readonly $moment: typeof moment;
}
}
Really this cannot be more simple. Its exactly the same code as many other libraries that works.
The package is installed and inside node_modules.
Completelly stuck there, desperatly need a hint where i did an error. Thanks in advance for help.