cep-promise icon indicating copy to clipboard operation
cep-promise copied to clipboard

[Typescript] Cannot use namespace 'cep' as a value.ts

Open lucasltv opened this issue 2 years ago • 3 comments

Someone else has the same problem when using with Typescript?

Steps to reproduce:

import cep, { CEP } from 'cep-promise';

....

const data = await cep(str, {});

Version: 4.1.2

I think that is a conflict definition for library.

lucasltv avatar Jun 14 '22 03:06 lucasltv

Just a workaround, adding the ts ignore next line comment:

// @ts-ignore: Unreachable code error
const data: CEP = await cep(str, {});

lucasltv avatar Jun 14 '22 04:06 lucasltv

@lucasltv you should try cep-any project

https://github.com/victorfernandesraton/cep-any

victorfernandesraton avatar Sep 26 '22 15:09 victorfernandesraton

Someone else has the same problem when using with Typescript?

Steps to reproduce:

import cep, { CEP } from 'cep-promise';

....

const data = await cep(str, {});

Version: 4.1.2

I think that is a conflict definition for library.

Someone else has the same problem when using with Typescript?

Steps to reproduce:

import cep, { CEP } from 'cep-promise';

....

const data = await cep(str, {});

Version: 4.1.2

I think that is a conflict definition for library.

Someone else has the same problem when using with Typescript?

Steps to reproduce:

import cep, { CEP } from 'cep-promise';

....

const data = await cep(str, {});

Version: 4.1.2

I think that is a conflict definition for library.

Same problem here

henriquemachad0 avatar Jan 26 '23 12:01 henriquemachad0