Slide 1
            
                
                
                    Typed Ember: Strong Types for Better Apps
Ember Community Discord: @jamescdavis
GitHub: @jamescdavis
Twitter: @jamscdavis
                 
             
                    Slide 2
            
                    Slide 3
            
                    Slide 4
            
                    Slide 5
            
                
                
                    About My Work
Front-end Lead, Center for Open Science
                 
             
                    Slide 6
            
                
                
                    About My Work
Open Science Framework (osf.io)
                 
             
                    Slide 7
            
                    Slide 8
            
                
                
                    About My Work
Typed-Ember Team
                 
             
                    Slide 9
            
                
                
                    About My Work
ember-cli-typescript co-maintainer
                 
             
                    Slide 10
            
                
                
                    About My Work
Ember and Ember Data type definitions
                 
             
                    Slide 11
            
                
                
                    About My Work
Type definitions for popular addons
                 
             
                    Slide 12
            
                    Slide 13
            
                    Slide 14
            
                    Slide 15
            
                
                
                    
“Automatic” Documentation
                
             
                    Slide 16
            
                
                
                    
API Documentation in Javascript
                
             
                    Slide 17
            
                
                
                    
API Documentation in TypeScript
                
             
                    Slide 18
            
                
                
                    
Return Types are Inferred
                
             
                    Slide 19
            
                    Slide 20
            
                
                
                    
Simple Function with Object Property Access
                
             
                    Slide 21
            
                
                
                    
Call Function with no Arguments
                
             
                    Slide 22
            
                
                
                    
TypeError: Cannot read property ‘bar’ of undefined
                
             
                    Slide 23
            
                    Slide 24
            
                
                
                    
Function with Object Method Call
                
             
                    Slide 25
            
                
                
                    
Call Function with Object Where Property is Not a Method
                
             
                    Slide 26
            
                
                
                    
TypeError: arg.baz is not a function
                
             
                    Slide 27
            
                    Slide 28
            
                
                
                    
What can we do about TypeError?
                
             
                    Slide 29
            
                
                
                    
TypeScript to the Rescue!
                
             
                    Slide 30
            
                
                
                    
Refactor with wild abandon
                
             
                    Slide 31
            
                    Slide 32
            
                    Slide 33
            
                    Slide 34
            
                
                
                    
Can we just provide one property?
                
             
                    Slide 35
            
                
                
                    
Nope, doesn't type-check.
                
             
                    Slide 36
            
                
                
                    
Mismatched type for one property?
                
             
                    Slide 37
            
                    Slide 38
            
                
                
                    
All properties present and correct type?
                
             
                    Slide 39
            
                    Slide 40
            
                
                
                    
Prevents you from trying to force a square peg in a round hole
                
             
                    Slide 41
            
                
                
                    
How do we TypeScript in Ember?
                
             
                    Slide 42
            
                    Slide 43
            
                    Slide 44
            
                
                
                    
compilation to Javascript
                
             
                    Slide 45
            
                    Slide 46
            
                    Slide 47
            
                    Slide 48
            
                
                
                    
SuperRentals tutorial app
                
             
                    Slide 49
            
                
                
                    
Javascript model vs. TypeScript model
                
             
                    Slide 50
            
                
                
                    
Javascript service vs. TypeScript service
                
             
                    Slide 51
            
                
                
                    
Template that invokes the RentalListing component
                
             
                    Slide 52
            
                
                
                    
RentalListing component converted to TypeScript Glimmer component
                
             
                    Slide 53
            
                    Slide 54
            
                
                
                    
Type Error at build-time with info on how to fix
                
             
                    Slide 55
            
                
                
                    
Back to original RentalListing component
                
             
                    Slide 56
            
                
                
                    
Try to perform an invalid operation on a property
                
             
                    Slide 57
            
                
                
                    
Type Error at build-time with explanation
                
             
                    Slide 58
            
                
                
                    
Frequently Asked Questions
                
             
                    Slide 59
            
                
                
                    
Do I have to convert everything at once?
                
             
                    Slide 60
            
                    Slide 61
            
                    Slide 62
            
                    Slide 63
            
                    Slide 64
            
                    Slide 65
            
                    Slide 66
            
                    Slide 67
            
                    Slide 68
            
                
                
                    
TS benefits for everybody!
                
             
                    Slide 69
            
                    Slide 70
            
                
                
                    
New syntax and concepts to learn
                
             
                    Slide 71
            
                
                
                    
Type definitions for third-party addons
                
             
                    Slide 72
            
                
                
                    
Definitely Typed @types/*
                
             
                    Slide 73
            
                
                
                    
Type definitions for Ember and Ember Data
                
             
                    Slide 74
            
                
                
                    
also Definitely Typed  @types/ember  @types/ember-data
                
             
                    Slide 75
            
                    Slide 76