crypto-browserify icon indicating copy to clipboard operation
crypto-browserify copied to clipboard

typescript support

Open MineYuanlu opened this issue 3 years ago • 5 comments

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

MineYuanlu avatar May 23 '22 12:05 MineYuanlu

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

ljharb avatar May 23 '22 15:05 ljharb

I solved the problem by adding the reference before import crypto

/// <reference types="node" />
import * as crypto from 'crypto';

dluvnn avatar Aug 14 '22 04:08 dluvnn

Who can solve the problem?

Bruce-zxy avatar Feb 23 '23 07:02 Bruce-zxy

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

ljharb avatar Feb 23 '23 17:02 ljharb

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

jglee96 avatar Apr 10 '23 01:04 jglee96