Framework7 Vue Typescript typings


#1

I’m currently using Framework7 version 2.3.0 with Vue using Typescript. To get that working we have been using the typings from the following repo:

https://github.com/JasonKleban/framework7-vue.d.ts.git

That repository is deleted causing that building the application fails. I see that Framework7 is already on V3, but how is the Typescript for Vue now managed? I want to upgrade, but what steps should I take?


#2

You need to update to v3 https://blog.framework7.io/migration-to-framework7-v3-928a21a1eac9


#3

Thanks. Found that link indeed. Typings are now integrated in the core. Nice!

However, I keep getting errors on Framework7Vue. I’m getting the following error:

TS7016: Could not find a declaration file for module ‘framework7-vue’. ‘/mnt/app/node_modules/framework7-vue/framework7-vue.js’ implicitly has an ‘any’ type.


#4

@nolimits4web It seems that the typings are missing in the package.json for framework7-vue. Can you confirm that? Is there another method to make the typings available in my project?


#5

Same problem here:raised_back_of_hand:


#6

@Shmuel_Gutman I’ve fixed this by added the directroy of framework7-vue to the tsconfig.json file.

I think it would be great if a template could be made for users who are working with Typescript.


#7

thanks @timmtim

under which configuration option? can you send an example?
thnaks.


#8
"paths": {
  "*": [
    "node_modules/framework7-vue/*"
  ]
}

#9

But F7-Vue typings are there (in package) https://github.com/framework7io/framework7/tree/master/packages/vue

What else need to be done?


#10

I got this when I tried to use TS (new to TS):


#11

Hm… after I restarted system - everything goes fine. I don’t know what was that… some cache maybe.


#12

I’m having this same issue, and a reboot didn’t help (along with the tsconfig modification) anyone else have a different solution?


#13

You guys need to configure TS to ignore F7-Vue components typings because there are no such