File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
1
# @nodecfdi/sat-estado-cfdi ChangeLog
2
2
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix types in consume method
8
+
3
9
## 2.0.1
4
10
5
11
### Patch Changes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @nodecfdi/sat-estado-cfdi" ,
3
- "version" : " 2.0.1 " ,
3
+ "version" : " 2.0.2 " ,
4
4
"description" : " Consulta el estado de un cfdi en el webservice del SAT" ,
5
5
"keywords" : [
6
6
" SAT" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ export class Consumer {
31
31
}
32
32
33
33
public execute ( expression : string ) : CfdiStatus {
34
- const responseConsumer : ConsumerClientResponseInterface = this . getClient ( ) . consume ( this . getUri ( ) , expression ) ;
34
+ const responseConsumer = this . getClient ( ) . consume < ConsumerClientResponseInterface > (
35
+ this . getUri ( ) ,
36
+ expression
37
+ ) as ConsumerClientResponseInterface ;
35
38
36
39
const builder = new CfdiStatusBuilder (
37
40
responseConsumer . get ( 'CodigoEstatus' ) ,
Original file line number Diff line number Diff line change 1
1
import { ConsumerClientResponseInterface } from './consumer-client-response-interface' ;
2
2
3
3
export interface ConsumerClientInterface {
4
- consume < T extends ConsumerClientResponseInterface | Promise < ConsumerClientResponseInterface > > (
5
- uri : string ,
6
- expression : string
7
- ) : T ;
4
+ consume < T extends ConsumerClientResponseInterface > ( uri : string , expression : string ) : T | Promise < T > ;
8
5
}
You can’t perform that action at this time.
0 commit comments