Is there any official Typescript definition for fabric js

0 votes

At the moment, I am able to find a Typescript definition for fabric.js in https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fabric (https://www.npmjs.com/package/@types/fabric). However, I am not sure if it is an official one. Does anyone know it?

On the other hand, the version of the above definition is 1.5.27 whereas the latest version of fabric.js is 1.7.19. Does it mean the definition is outdated? Does anyone know how to generate an updated definition for the latest fabric.js?

Thanks.

Aug 2, 2022 in TypeSript by Elton
• 400 points
1,482 views

1 answer to this question.

0 votes

Typically, packages in Definitely Typed aren't official type definitions. They are user contributed for the better typing of all: https://github.com/DefinitelyTyped/DefinitelyTyped#how-can-i-contribute.

If there were official type definitions, it would likely be in the library itself, in which case, you wouldn't need a separate file download.

From FabricJs's github: https://github.com/fabricjs/fabric.js/issues/4507#issuecomment-469191403

we do not have any. No one ever did them.

The Definitely Typed file is likely the best you are going to get right now. If there's anything wrong with the type definitions, you should be able to set up a .d.ts file that extends the type definitions that exist. Or just bring the definitely typed files into your project and modify them as needed to update it.

There are Definitely Typed versions for version 3.6.3 of fabricjs.

answered Aug 3, 2022 by Abhinaya
• 1,160 points

Related Questions In TypeSript

0 votes
1 answer
0 votes
1 answer

TypeScript TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'

If you want a key/value data structure ...READ MORE

answered Jun 7, 2022 in TypeSript by Nina
• 3,060 points
18,384 views
0 votes
1 answer
0 votes
1 answer
0 votes
0 answers

Is there any official Typescript definition for fabric.js?

At the moment, I am able to ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
593 views
0 votes
1 answer

Cannot access web3 object with typescript and ethereum

You still need to instantiate it first. ...READ MORE

answered Sep 25, 2018 in Blockchain by slayer
• 29,370 points
2,884 views
0 votes
1 answer

How to apply zoom animation for each element of a list in angular?

Hey @Sid, do check if this link ...READ MORE

answered Jul 30, 2019 in Others by Vardhan
• 13,150 points
1,549 views
0 votes
1 answer
0 votes
1 answer

What is the question mark for in a Typescript parameter name?

It is to mark the parameter as optional. TypeScript ...READ MORE

answered Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,421 views
0 votes
1 answer

Get typescript definition files via bower?

It is possible with bower. First install bower ...READ MORE

answered Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
799 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP