Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.d.ts is not a module. #58

Open
gigeos opened this issue Sep 2, 2021 · 3 comments
Open

index.d.ts is not a module. #58

gigeos opened this issue Sep 2, 2021 · 3 comments

Comments

@gigeos
Copy link

gigeos commented Sep 2, 2021

Hello!
Thank you for your job! But I have a typing issue with version 1.3.10

When I do:
import Aes from 'react-native-aes-crypto'

I have the following issue:
File '/node_modules/react-native-aes-crypto/index.d.ts' is not a module

@jhartmanlinus
Copy link

i get this issue as well

@jhartmanlinus
Copy link

declare module '@tectiv3/react-native-aes-crypto' {
function pbkdf2(password: string, salt: string, cost: number, length: number): Promise;
function encrypt(text: string, key: string, iv: string): Promise;
function decrypt(ciphertext: string, key: string, iv: string): Promise;
function hmac256(ciphertext: string, key: string): Promise;
function randomKey(length: number): Promise;
function sha1(text: string): Promise;
function sha256(text: string): Promise;
function sha512(text: string): Promise;
}

needs to be

declare module 'react-native-aes-crypto' {
function pbkdf2(password: string, salt: string, cost: number, length: number): Promise;
function encrypt(text: string, key: string, iv: string): Promise;
function decrypt(ciphertext: string, key: string, iv: string): Promise;
function hmac256(ciphertext: string, key: string): Promise;
function randomKey(length: number): Promise;
function sha1(text: string): Promise;
function sha256(text: string): Promise;
function sha512(text: string): Promise;
}

after bundled

@huydv92
Copy link

huydv92 commented Nov 1, 2021

Hello.
Could you help me fix this bug? I also can't import this library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants