Skip to content

Commit

Permalink
Merge pull request BrasilAPI#196 from bearkfear/patch-1
Browse files Browse the repository at this point in the history
Corrige interface
  • Loading branch information
lucianopf authored Jan 20, 2021
2 parents 6a1afa0 + 20d86e0 commit 5ac4e15
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ declare module 'cep-promise' {

// this workarround is because this : https://github.com/Microsoft/TypeScript/issues/5073
namespace cep {}

type AvaliableProviders =
"brasilapi" |
"correios" |
"viacep" |
"widenet"

function cep( cep: string | number ): Promise<CEP>
export interface Configurations {
providers: AvaliableProviders[]
}

export function cep(cep: string | number, configurations: Configurations): Promise<CEP>

export default cep
}

0 comments on commit 5ac4e15

Please sign in to comment.