@@ -37,6 +37,12 @@ Software Developer **👨💻** @CoWrks
37
37
38
38
# Why?
39
39
40
+ <img src = { " ./assets/satan-hail.webp" } width = { 500 } />
41
+
42
+ ---
43
+
44
+ # Why?
45
+
40
46
<ul >
41
47
<Appear >
42
48
<li > Early detection of type errors</li >
@@ -57,6 +63,12 @@ Software Developer **👨💻** @CoWrks
57
63
58
64
---
59
65
66
+ # Comparison
67
+
68
+ ![ comparision] ( ./assets/type-comparision.png )
69
+
70
+ ---
71
+
60
72
### Getting Types right is hard
61
73
62
74
![ Typechecking for javascript can sometimes be intimidating] ( ./assets/newtypechecker.png )
@@ -236,8 +248,8 @@ class Person {
236
248
}
237
249
238
250
const guy = new Person({
239
- name: Sam ,
240
- age: 32
251
+ name: " Subramanya " ,
252
+ age: 25
241
253
})
242
254
guy.sayName()
243
255
```
@@ -260,7 +272,7 @@ JsDoc for classes
260
272
/**
261
273
* @type { Options } opts
262
274
*/
263
- const opts = { firstName : " Joe " , lastName : " Bodoni " , age : 32 }
275
+ const opts = { firstName : " Subramanya " , lastName : " Chakravarthy " , age : 25 }
264
276
```
265
277
266
278
---
@@ -380,46 +392,16 @@ const btn = document.createElement('button')
380
392
381
393
---
382
394
383
- export default FullScreenCode
395
+ ### You can import from another file
384
396
385
397
```javascript
386
398
/**
387
- * Props define attributes on a virtual node.
388
- * @typedef { Object .< string , any > | {}} Props
389
- * @property { Children } Props.children
390
- */
391
- /**
392
- * The vnode children of a virtual node.
393
- * @typedef { VNode []} Children
394
- */
395
- /**
396
- * Define a custom type for virtual nodes:
397
- * @typedef { string | number | Function } Type
398
- * @typedef { Object .< string , any > } VNode
399
- * @property { Type } VNode.type
400
- * @property { Props } VNode.props
401
- * @property { Children } VNode.children
402
- * @property { Key } [VNode.key]
399
+ * @param { import (" react" ).ChangeEvent < HTMLInputElement > } event
403
400
*/
404
- ```
405
-
406
- ---
407
-
408
- You can import from another file
409
-
410
- ```javascript
411
- import { createVNode } from ' ../vnode'
412
- /**
413
- * @typedef { import (' ./vnode' ).VNode } VNode
414
- */
415
-
416
- // Some code that create options for createVNode to use.
417
- const options = ...
418
- /**
419
- * @param { Object < string , any > } options
420
- * @return { VNode } VNode
421
- */
422
- const vnode = createVNode(options)
401
+ handleChange = event => {
402
+ const { value } = event .target
403
+ this .setState (() => ({ description: value }))
404
+ }
423
405
```
424
406
425
407
---
@@ -438,14 +420,20 @@ const price = 12 // or '12'
438
420
* @type { {name: string }, {age: number }}
439
421
*/
440
422
const person = {
441
- name : " Joe " ,
442
- age : 32
423
+ name : " Subramanya " ,
424
+ age : 25
443
425
}
444
426
```
445
427
446
428
---
447
429
448
- ### Let's Dig into react
430
+ ### Let's Do Live Coding
431
+
432
+ ---
433
+
434
+ ### Summary
435
+
436
+ 
449
437
450
438
---
451
439
0 commit comments