sirrus233 / twilight-imperium-helper

Game assistant for Twilight Imperium
1 stars 0 forks source link

Unit images 🚀 #1

Closed chelseaSchmidt closed 3 months ago

chelseaSchmidt commented 3 months ago

Do the images show up when you run it? Also does this change look funky to you? I haven't created a .d.ts file before and I don't really understand the significance, just couldn't figure out another way to make Typescript and Webpack play nice 😭

sirrus233 commented 3 months ago

Looks fantastic! :tada: :tada: :tada:

And I got to learn about *.d.ts files, so thanks for that :) There's a very similar concept in python. The significance is pretty much exactly what you said - provide types to typescript for an un-typed file. So webpack converts image -> untyped javascript, and the d.ts file explains to typescript what the types exported from those modules are.

chelseaSchmidt commented 3 months ago

And I got to learn about *.d.ts files, so thanks for that :) There's a very similar concept in python. The significance is pretty much exactly what you said - provide types to typescript for an un-typed file. So webpack converts image -> untyped javascript, and the d.ts file explains to typescript what the types exported from those modules are.

Nice! Aaah so that's what webpack is doing, think I get it now!