What Are *.d.ts files? How to Use *.d.ts Files in TypeScript?

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Yeah really helpful. I was confused about whether the d.ts files are just for auto-generated type definitions and/or used to define types. Your suggestion to leave .d.ts files for auto-generation and .ts file for locally defined types has cleared the mist for me.

monkeymagic
Автор

For a long time I was wondering what these *.d.ts files are and what these are used for.
This video cleared all the doubts about it.
Thanks from India for sharing.

rahul-thakare
Автор

Man, I have been looking for a channel like this for months!! Keep going!

yuriihusak
Автор

Thank you for this video ! I finally understand why I was struggling so much to install "Vue 2" libraries like vue-zoomer or vue-picture-swipe. They didn't support typescript apparently so they don't include the /type folder with the index.d.ts definitions either.
If anyone else faced this issue I resolved it by adding a 'declare module 'vue-zoomer';' line to my 'shims-vue.d.ts' file and then I can follow instructions from the Github or official website for the library in order to add the components. What this does is treats the component as an 'any' type which still works fine (you just don't get the benefits of strongly typed javascript while using typescript).

facundosoler
Автор

You are plain awesome! The best explanation to understand types in TypeScript.

ajaykotian
Автор

Thats precisely i was looking for. Thanks for a very short and clear video

swaroopbhave
Автор

Твои видео выходят быстрее, чем я успеваю развиваться. Спасибо большое за то, что делаешь фронтенд доступней)

mikhailgrechka
Автор

Thank you Maksim! Excellent explanation!

ninjarogue
Автор

Great content man, more typescript videos!

matthewzecchini
Автор

Very well explained and organized. Thank you

ajithmoni
Автор

This is really helpful! Well done and thank you :)
It seems like .d.ts files are a parallel to interfaces in Java, since you export function definitions but not implementations. It might be interesting to see a .d.ts file used that way

thebluechimera
Автор

Thank you so much, this was very informative!

kevinnacario
Автор

Thanks for the explanation, I used files like that but I didn't know why.

jeferson.luckas
Автор

Very helpfull Sir. I have problem like this in my express-handlebars. Many thanks from Indonesia.

valentinussofa
Автор

Thanks this is quite helpful, as I'm learning

raymondmichael
Автор

Hey Maksim, great channel.
As I know you don't need to export types from *.d.ts files. Types should be available w/o export/import.

grzegorzzych
Автор

thanks for the video. it is well explained

specterepiphane
Автор

Thank you for amazing tutorials!
Which extension do you use: "VSCode Neovim" or "Vim"? If first one, how did you manage to fix mouse selection? Thank you in advance!

codecodecode
Автор

Thanks for the video, and if you can make a video series covering tsconfig, project reference, and other topic regarding tsconfig as even the official docs aren't that easy to understand.

omarislearning
Автор

Thanks for these explanations!
How do I generate d.ts files for an npm package that doesn't not have one ?

tntg