Open OzairP opened 6 years ago
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
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
Not sure if this is correct but after adding the interface from above, I still received errors. My solution in addition to the above was to create a .d.ts file and declare the module.
// src/vuesax.d.ts
declare module 'vuesax';
Acabo de intentar con las soluciones anteriores, pero hasta el momento me sigue generando dicho error. Quiero importar Vuesax a un proyecto en Ionic (Vue|Typescript)😔
Still waiting...
Still waiting...
Still waiting... But no, it's not working with Vue3 + TypeScript...
declare module 'vuesax' {
import { PluginFunction } from 'vue'
const Vuesax: { install: PluginFunction<any> }
export default Vuesax
}
A
.d.ts
declaration file would be awesome for TypeScript users:)