indutny / hash.js

Hash functions in pure javascript
317 stars 42 forks source link

fix typescript export #12

Closed jorisdebock closed 6 years ago

jorisdebock commented 7 years ago

for typescript import to work it should be '=' instead of 'default'

import * as hash from "hash.js";
sublimator commented 7 years ago

@indutny

I can haz?

jlherren commented 7 years ago

+1

I can't get my angular 4 project to compile at all without this. But this file needs to be fixed anyway... it seems that a lot of typing is wrong, because I have to specify 'any' on all my types for it to work at all. Why the hell does digest('hex') not return a string for example? Lots of tslint issues as well.

sublimator commented 7 years ago

@jlherren

Pull request ?

OzairP commented 6 years ago

@indutny please merge.

Current work around:

(hash as any as Hash).sha512()
indutny commented 6 years ago

Published in 1.1.4.