File tree Expand file tree Collapse file tree 1 file changed +21
-21
lines changed
Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change 11
2- import { JsonDecoder , jsonDecodable , jsonProperty , jsonType } from '../'
3- import { JsonDecoderValidationError } from '../json/json-decoder-errors'
2+ // import { JsonDecoder, jsonDecodable, jsonProperty, jsonType } from '../'
3+ // import { JsonDecoderValidationError } from '../json/json-decoder-errors'
44
5- @jsonDecodable ( {
6- useConstructor : true ,
7- } )
8- class Test {
5+ // @jsonDecodable ({
6+ // useConstructor: true,
7+ // })
8+ // class Test {
99
10- @jsonProperty
11- @jsonType ( Boolean )
12- test : boolean = false
10+ // @jsonProperty
11+ // @jsonType (Boolean)
12+ // test: boolean = false
1313
14- }
14+ // }
1515
1616// // @jsonDecodable ()
1717// // @jsonSchema ({
@@ -196,14 +196,14 @@ class Test {
196196
197197// }
198198
199- try {
200- const t = JsonDecoder . decode < Test > ( {
201- test : '1' ,
202- } , Test , {
203- lazyDecode : true ,
204- } )
205- console . log ( t ! . test )
206- console . log ( t ! . test )
207- } catch ( err ) {
208- console . error ( ( err as JsonDecoderValidationError ) . validationErrors [ 0 ] . message )
209- }
199+ // try {
200+ // const t = JsonDecoder.decode<Test>({
201+ // test: '1',
202+ // }, Test, {
203+ // lazyDecode: true,
204+ // })
205+ // console.log(t!.test)
206+ // console.log(t!.test)
207+ // } catch (err) {
208+ // console.error((err as JsonDecoderValidationError).validationErrors[0].message)
209+ // }
You can’t perform that action at this time.
0 commit comments