From Deno 2 documentation https://docs.deno.com/runtime/fundamentals/typescript/
for NPM packages that don't provide type information:
main.ts
// @ts-types="npm:@types/lodash"
import * as _ from "npm:lodash";
There are many more examples on that documentation page.