In vue's TypeScript project, how to add a new declaration file (.d.ts) that contains the "declaration module 'sha256'"

problem description

vue-cli3.0TypeScriptTypeScriptsha256npm

the environmental background of the problems and what methods you have tried

npmsha256import
[ts]
"sha256" "/Users/wangjie/Desktop/ts/web/node_modules/_sha256@0.2.0@sha256/lib/nodecrypto.js"  "any" 
   "npm install @types/sha256" ()" "sha256" " (.d.ts);

node-rsa"npm install @types/node-rsa"sha256" "sha256" " (.d.ts)


what result do you expect? What is the error message actually seen?

sha256(.d.ts)
Jul.01,2021
Menu