Skip to content

Commit 8452f1f

Browse files
committed
fix(typings): fix type for angular 5
in issue BrasilAPI#112, we saw the problem with angular 5. in my tests, i install angular 5 and rollback the definition without workarround solved for default function microsoft/TypeScript#5073 and this back work, i think this worked because typescript can have a fix in recent version.
1 parent 01c8055 commit 8452f1f

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ require('/dist/cep-promise-browser.min.js')
171171
}
172172
```
173173

174-
#### Angular 2
174+
#### Angular 2/4/5
175175

176176
``` ts
177-
import * as cep from 'cep-promise'
177+
import cep from 'cep-promise'
178178

179179
cep('05010000')
180180
.then(console.log)

index.d.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,5 @@ declare module 'cep-promise' {
77
neighborhood: string
88
}
99

10-
// this workarround is because this : https://github.com/Microsoft/TypeScript/issues/5073
11-
namespace cep {}
12-
13-
function cep( cep: string | number ): Promise<CEP>
14-
15-
export = cep
10+
export default function cep(cep: string | number): Promise<CEP>
1611
}
17-
18-

0 commit comments

Comments
 (0)