Vuesax: No TypeScript Declaration File

Created on 30 Apr 2018  路  21Comments  路  Source: lusaxweb/vuesax

A .d.tsdeclaration file would be awesome for TypeScript users:)

enhancement good first issue help wanted

Most helpful comment

Any update on that? A @types/vuesax would be great! I would like to start a new project using this template but we need to build it with typescript

All 21 comments

Been reading up on this... Apparently, we would have to use ts-loader with Webpack and compile the templates before distribution... I haven't found any other way yet. @luisDanielRoviraContreras you okay with that?

Well if that is the solution to give it! Can you make a PR on this?

@Rickgg ts-loader is only needed if you're actually using TypeScript within the project. However if you're not you can simply define index.d.ts without any compilation to type the method signatures. This won't be packaged with WebPack

See: https://github.com/ElemeFE/element/tree/dev/types

Will check that out, thanks.

hope can support typescript

at vue cli 3
there has many error

84:20 Property 'colorAlert' does not exist on type 'Vue'.
    82 |     acceptAlert(){
    83 |       this.$vs.notify({
  > 84 |         color:this.colorAlert,
       |                    ^
    85 |         title:'Accept Selected',
    86 |         text:'Lorem ipsum dolor sit amet, consectetur'
    87 |       })

Any update on that? A @types/vuesax would be great! I would like to start a new project using this template but we need to build it with typescript

Anything? I am in need of this as well (or would like it anyway) :)

Any updates? I am looking for a solution... Please add the types.

Also here because of TypeScript support. On larger projects, especially the one like Vuesax Admin, TypeScript can be very helpful.

@bluelovers you can resolve errors like that by creating declaration file.
EX:
src/types/declarations/vue-instance-types.ts

import Vue from "vue";

declare module "vue/types/vue" {
  interface Vue {
    $vs: any; // vuesax custom plugin
  }
}

Also don't forget to reload VS Code.

Any updates? I am looking for a solution... Please add the types.

Does anyone know a work around? My project is dead in the water without TS support.

@rashadrivera in the new version we are working with ts and it will have its respective file

ts and it will have its respective file

luisDanielRoviraContreras,

That is great. Is that version in your Git repo? I'm not seeing it. Also, if I could help speed that along, please let me know. I'm basically stuck until this gets released. Unfortunetelly, I've invested in a template that uses Vuesax, but my project is built in Vue/TypeScript.

Also here because of TypeScript support. On larger projects, especially the one like Vuesax Admin, TypeScript can be very helpful.

@bluelovers you can resolve errors like that by creating declaration file.
EX:
src/types/declarations/vue-instance-types.ts

import Vue from "vue";

declare module "vue/types/vue" {
  interface Vue {
    $vs: any; // vuesax custom plugin
  }
}

Also don't forget to reload VS Code.

This is a excellent soluction, very good

im not need this file, i mean the .d.ts for vuesax

@rashadrivera in the new version we are working with ts and it will have its respective file

any news on that subject?

Need .d.ts file too..

any news?

Really need .d.ts file

Two years and no declaration file? If that's the case, guessing this is abandoned.

Still waiting...

Also waiting.

So glad I didn't yet purchase the premium variant

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mjmnagy picture mjmnagy  路  3Comments

sangdth picture sangdth  路  4Comments

hahuy95 picture hahuy95  路  3Comments

grali picture grali  路  4Comments

CaptainCannabis picture CaptainCannabis  路  3Comments