Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing typescript types #44

Closed
ChristPetitjean opened this issue Nov 7, 2019 · 5 comments
Closed

Missing typescript types #44

ChristPetitjean opened this issue Nov 7, 2019 · 5 comments
Labels
feature New feature or request

Comments

@ChristPetitjean
Copy link

When importing in typescript project, we are missing Types:
image

@dm4t2 dm4t2 added the feature New feature or request label Nov 7, 2019
@dm4t2
Copy link
Owner

dm4t2 commented Nov 7, 2019

Typescript support will be added shortly.

@ChristPetitjean
Copy link
Author

here is a workaround to get your component work with Typescript for impatient people like me 😛 . (waiting for your implementation of course 🤣 )

vue-currency-input.d.ts

import Vue, { Component, PluginFunction, VueConstructor, DirectiveOptions, PluginObject, DirectiveFunction } from 'vue'

interface CurrencyDirective extends PluginObject<undefined> {
    currency: DirectiveFunction;
    CurrencyDirective: Component;
}

declare const CurrencyDirective: CurrencyDirective;
export = CurrencyDirective;

declare module 'vue/types/vue' {
    interface Vue {
      $parseCurrency(formattedValue: string | number, locale: string, currency: string): number
    }
  }

dm4t2 added a commit that referenced this issue Nov 17, 2019
@dm4t2 dm4t2 added this to the Release 1.12.0 milestone Nov 17, 2019
@dm4t2
Copy link
Owner

dm4t2 commented Nov 19, 2019

TypeScript support has been added in Release 1.12.0 🎉

@dm4t2 dm4t2 closed this as completed Nov 19, 2019
@kevinmelo
Copy link

Still with the same error when using <script lang="ts">

@dm4t2
Copy link
Owner

dm4t2 commented Jan 2, 2023

Still with the same error when using <script lang="ts">

Which version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants