You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm working on a project that uses Vue 3 and Typescript. I was wondering if you could include a type declaration module (.d.ts file) in the package. I'd be glad to help but I'm kinda a novice in this.
Could not find a declaration file for module 'vue-numeric'. '[redacted]/node_modules/vue-numeric/dist/vue-numeric.min.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/vue-numeric` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-numeric';`ts(7016)
Reacted by Jan Madeyski, Marco Antonio and Tor Hovland
Just created a small module declaration. Surely not the best... vue-numeric.d.ts
declare module "vue-numeric"{importVuefrom"vue";interfaceVueNumericextendsVue,HTMLInputElement{props: {currency: string;// Currency prefixcurrencySymbolPosition: string;// Position of the symbol (accepted values: prefix or suffix)decimalSeparator: string;// Custom decimal separatoremptyValue: number;// Value when input is emptymax: number;// Maximum value allowedmin: number;// Minimum value allowedminus: boolean;// Enable/disable negative valuesoutputType: string;// Output Type for input eventplaceholder: string;// Input placeholderprecision: number;// Number of decimalsreadOnly: boolean;// Hide input field and show the value as textreadOnlyClass: string;// Class for read-only elementseparator: string;// Thousand separator symbol (accepts space, . or ,)thousandSeparator: string;// Custom thousand separator};}}
Activity
vandelpavel commentedon Dec 20, 2021
Just created a small module declaration. Surely not the best...
vue-numeric.d.tsamchconsult commentedon Dec 29, 2021
Hi Kevin,
Are you going to do a Vue3 version?
I have test the one mentioned but it is not working.
thank you
robinrossow commentedon May 25, 2023
I rewrote this component for my needs in TS and for Vue3, maybe it suits your needs to?
https://github.com/robinrossow/vue-input-number