How to make the type declared by d.ts take effect within the script tag of the html file

< H2 > problem description < / H2 >

Namespaces or global variables declared in the global.d.ts file do not take effect within the script tag of the html file

< H2 > the environmental background of the problem and what methods you have tried < / H2 >

individuals like vscode to cooperate with d.ts file"s intelligent completion function, so for their own files, they will write a d.ts file. In js file, intelligent completion works very well, but in the script tag of html file, intelligent completion does not appear the type declared in d.ts file

. < H2 > related codes < / H2 >
   

Feb.25,2022

doesn't seem to support it right now. If you want to use hints, why not extract this part of the code into a js and introduce script?


refer to https://ts.xcatliu.com/basics/declaration-files-sharpexport-1

this is a document that teaches you how to write .d.ts

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bab6-44e60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bab6-44e60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?