Skip to content

Commit 5ac4e15

Browse files
authored
Merge pull request #196 from bearkfear/patch-1
Corrige interface
2 parents 6a1afa0 + 20d86e0 commit 5ac4e15

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

index.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,18 @@ declare module 'cep-promise' {
1010

1111
// this workarround is because this : https://github.com/Microsoft/TypeScript/issues/5073
1212
namespace cep {}
13+
14+
type AvaliableProviders =
15+
"brasilapi" |
16+
"correios" |
17+
"viacep" |
18+
"widenet"
1319

14-
function cep( cep: string | number ): Promise<CEP>
20+
export interface Configurations {
21+
providers: AvaliableProviders[]
22+
}
23+
24+
export function cep(cep: string | number, configurations: Configurations): Promise<CEP>
1525

1626
export default cep
1727
}

0 commit comments

Comments
 (0)