browserify / crypto-browserify

partial implementation of node's `crypto` for the browser
MIT License
653 stars 199 forks source link

typescript support #216

Open MineYuanlu opened 2 years ago

MineYuanlu commented 2 years ago

Can you provide an crypto-browserify.d.ts? I am using typescript. Without this file, my editor will report an error. At present, I am using a magic revision of crypto.d.ts, and only change its module name to crypto-browserify

ljharb commented 2 years ago

Types should come from a DT package, and someone would have to make one.

dluvnn commented 1 year ago

I solved the problem by adding the reference before import crypto

/// <reference types="node" />
import * as crypto from 'crypto';
Bruce-zxy commented 1 year ago

Who can solve the problem?

ljharb commented 1 year ago

@Bruce-zxy literally anyone who makes a PR to DefinitelyTyped.

jglee96 commented 1 year ago

some modules have DT https://github.com/search?q=repo%3ADefinitelyTyped%2FDefinitelyTyped%20crypto-browserify&type=code