Now how would that work with types for typescript per module
@xerxius54462 жыл бұрын
Wow, Did not know about type:"module" , really useful !
@Ashotofcode2 жыл бұрын
Glad to hear that! Cheers Mark 😀
@russelldriver63943 жыл бұрын
Very interesting. I didnt realise just by adding type module means you can use the import keyword in node. Does this mean require keyword will start fading away, or do they both have their best use cases?
@Ashotofcode3 жыл бұрын
Hi Russell, require will slowly die out I would think yes, import is the way to go in terms of consistency with the browser and a standards based approach for sure. Cheers Mark.
@dailymeow32833 жыл бұрын
It's a good idea, making a custome node_module, i will try it
@Ashotofcode3 жыл бұрын
Go for it!
@Ajay-ss7ws8 ай бұрын
"exports": { "./package.json": "./package.json", ".": { "types": { "import": "./index.d.mts", "default": "./index.d.ts" } } }, I want to import "./index.d.ts" and want to pass it to monaco editor for IntelliSense. How I can do that. This export is inside package.Json file of mustache package and I want to add intellisense for mustache inside monaco editor