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

Support for typescript #13

Open
Jamesvandenhoudt opened this issue May 2, 2018 · 3 comments
Open

Support for typescript #13

Jamesvandenhoudt opened this issue May 2, 2018 · 3 comments

Comments

@Jamesvandenhoudt
Copy link

Can you add support for type definitions, please?

@apertureless
Copy link
Owner

Not really experienced in ts.
So if anyone want to make a PR, feel free to do it :)

✌️

@carloca68
Copy link

Hi guys, made the component works with typescript just changing the import to:

import * as Password from 'vue-password-strength-meter'

Hope it helps, cheers.

@zecka
Copy link

zecka commented Aug 11, 2020

Or create a file vue-password-strength-meter.d.t anywhere in your project with following line:

declare module 'vue-password-strength-meter';

And if you need to get it to work with Nuxt in `universal' mode

  1. Create a vue-password-strength-meter.ts file in the plugin directory
import Vue from 'vue'
import Password from 'vue-password-strength-meter'
Vue.use(Password)
  1. In the nuxt.config.js file
...
plugin: [
    { src: '~plugins/vue-password-strength-metter', ssr: false }
],
...
  1. In a template:
 <client-only>
      <password v-model="password" :strength-meter-only="true" />
 </client-only>

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

No branches or pull requests

4 participants