#learnts search results
#learnTS 10. UTILITY TYPES contd The images show the different utility types used in TS. Sometimes, you don't need to create a brand new type from scratch There are 13 of them listed. Bookmark so you don't forget😌 Use when needed. Use #learnTS to learn what TS is about🧵
#learnTS 3. ANY DATATYPE I avoid "any" datatype What about when you use libraries that don't have type definitions ? Tomorrow we will see about that
#learnTS 4. UNKNOWN TYPE When dealing with a library with type not defined, you can use "unknown" type instead of "any" A better alternative, in my opinion 😊
#learnTS 7. TYPE(S) IN TYPESCRIPT If this is confusing, use the hashtag to see where I'm coming from(previous posts). Type is a very important concept in ts. It's very broad. Hovering over your code is good actually to confirm types
#learnTS 1. TYPESCRIPT BASIC TYPES First, let's look at type annotations in Typescript: Implicit and explicit type annotations. We are going to be using explicit type annotation to aid understanding, i.e., we will explicitly tell Typescript what each variable should be🧵
#learnTS 2.. TYPE ANNOTATIONS IN TYPESCRIPT Implicit type annotation === inference It is a very important concept in Typescript, where it guesses the variable type based on your input. For both, the types assigned to a variable, function, parameter, etc, must be consistent.
Back to my roots😅 #learnTS 12. OPTIONAL VS DEFAULT PARAMETERS Adding "?" after a parameter makes it optional, In the first image with greet("Sarah") the value of age is undefined. Note that optional parameters must always come after required ones, why? Scroll with me
#learnTS 5. NEVER TYPE Before I knew anything about typescript, when I was using a React useState hook with a default value of empty array, typescript normally infers it to be a never type. I was able to assign it values because a. It wasn't typescript b. noImplicitAny : true
#learnTS 6. UNION ( | ) Think of it like the "or logical operation" but for types. It allows multiple valid types. The type keyword lets you customise types. The autocomplete feature of typescript is seen when types are declared. Will talk more about types tomorrow.
Will get better at this 😊 Taking my building in public to the next level, I'm coming full force 📌 I won't just make videos, I will tweet, drop challenges, etc I'll use #learnTS for my typescript journey Not all heroes wear cape, @Pallojnrr Thanks for the confidence boost
Thank you for the birthday wishes yesterday 🥹 #learnTS 8. INTERFACE IN TS Interface does the same thing as type but in a different format It is defined as an object. All properties must be used and types must match the said properties.
#learnTS 9. UTILITY TYPES This is a concise way of creating a new type from an already existing type or interface In the pictures below, I use Pick as my example today. The first parameter is the origin type or interface that you want to copy and the second parameter 🧵
The correct answer is any Thank you all for participating 😊 Thursdays will be our quiz day 🥳 #learnTS
#learnTS Quiz Timee 📢 let data; What type will Typescript assign to data by default? The answer highlights what will be discussed tomorrow
#learnTS 11. TYPES VS INTERFACE When do you decide which to use, or better yet do you combine them? Lets dig deep into the differences Why? Their use-case may be similar but the syntax are definitely not 🧵 Bookmark so you don't forget😌
#learnTS Quiz Timee 📢 let data; What type will Typescript assign to data by default? The answer highlights what will be discussed tomorrow
#learnTS Quizzz 😏 In TS, which is TRUE for default values? It can be assigned: A) in an interface for its properties B) only in functions, not in types or interfaces. C) by Generic type parameters to provide "defaults" in types and interfaces. D) B and C are correct.
#learnTS Quiz dayyyy 🥳 type ID = number | string type Point = [number, number] What is Point?
8 vote · Final results
#learnTS When using typescript with node.js, have you ever used hydrated-document before? It is something I haven't really seen talked about I'm thinking of writing a medium article on it. It is a cleaner way to extend your document types in your schema PS: I use mongo dB
#learnTS Quizzz 😏 In TS, which is TRUE for default values? It can be assigned: A) in an interface for its properties B) only in functions, not in types or interfaces. C) by Generic type parameters to provide "defaults" in types and interfaces. D) B and C are correct.
Back to my roots😅 #learnTS 12. OPTIONAL VS DEFAULT PARAMETERS Adding "?" after a parameter makes it optional, In the first image with greet("Sarah") the value of age is undefined. Note that optional parameters must always come after required ones, why? Scroll with me
#learnTS 11. TYPES VS INTERFACE When do you decide which to use, or better yet do you combine them? Lets dig deep into the differences Why? Their use-case may be similar but the syntax are definitely not 🧵 Bookmark so you don't forget😌
#learnTS 10. UTILITY TYPES contd The images show the different utility types used in TS. Sometimes, you don't need to create a brand new type from scratch There are 13 of them listed. Bookmark so you don't forget😌 Use when needed. Use #learnTS to learn what TS is about🧵
#learnTS When using typescript with node.js, have you ever used hydrated-document before? It is something I haven't really seen talked about I'm thinking of writing a medium article on it. It is a cleaner way to extend your document types in your schema PS: I use mongo dB
#learnTS Quizz dayy🥳📢 What does infer help you do in TypeScript? A. Infer the type of an object at runtime B. Create conditional types that extract inner types C. Automatically assign default values to types D. Declare types in JSX files Think twice before answering 🥂
#learnTS Quiz dayyyy 🥳 type ID = number | string type Point = [number, number] What is Point?
8 vote · Final results
#learnTS 9. UTILITY TYPES This is a concise way of creating a new type from an already existing type or interface In the pictures below, I use Pick as my example today. The first parameter is the origin type or interface that you want to copy and the second parameter 🧵
Thank you for the birthday wishes yesterday 🥹 #learnTS 8. INTERFACE IN TS Interface does the same thing as type but in a different format It is defined as an object. All properties must be used and types must match the said properties.
#learnTS 7. TYPE(S) IN TYPESCRIPT If this is confusing, use the hashtag to see where I'm coming from(previous posts). Type is a very important concept in ts. It's very broad. Hovering over your code is good actually to confirm types
#learnTS 6. UNION ( | ) Think of it like the "or logical operation" but for types. It allows multiple valid types. The type keyword lets you customise types. The autocomplete feature of typescript is seen when types are declared. Will talk more about types tomorrow.
#learnTS Quiz dayyy 🥳 Which is risky and can break your app silently
#learnTS 5. NEVER TYPE Before I knew anything about typescript, when I was using a React useState hook with a default value of empty array, typescript normally infers it to be a never type. I was able to assign it values because a. It wasn't typescript b. noImplicitAny : true
#learnTS 4. UNKNOWN TYPE When dealing with a library with type not defined, you can use "unknown" type instead of "any" A better alternative, in my opinion 😊
#learnTS 3. ANY DATATYPE I avoid "any" datatype What about when you use libraries that don't have type definitions ? Tomorrow we will see about that
The correct answer is any Thank you all for participating 😊 Thursdays will be our quiz day 🥳 #learnTS
#learnTS Quiz Timee 📢 let data; What type will Typescript assign to data by default? The answer highlights what will be discussed tomorrow
#learnTS Quiz Timee 📢 let data; What type will Typescript assign to data by default? The answer highlights what will be discussed tomorrow
#learnTS 2.. TYPE ANNOTATIONS IN TYPESCRIPT Implicit type annotation === inference It is a very important concept in Typescript, where it guesses the variable type based on your input. For both, the types assigned to a variable, function, parameter, etc, must be consistent.
#learnTS 1. TYPESCRIPT BASIC TYPES First, let's look at type annotations in Typescript: Implicit and explicit type annotations. We are going to be using explicit type annotation to aid understanding, i.e., we will explicitly tell Typescript what each variable should be🧵
#learnTS 3. ANY DATATYPE I avoid "any" datatype What about when you use libraries that don't have type definitions ? Tomorrow we will see about that
#learnTS 10. UTILITY TYPES contd The images show the different utility types used in TS. Sometimes, you don't need to create a brand new type from scratch There are 13 of them listed. Bookmark so you don't forget😌 Use when needed. Use #learnTS to learn what TS is about🧵
#learnTS 4. UNKNOWN TYPE When dealing with a library with type not defined, you can use "unknown" type instead of "any" A better alternative, in my opinion 😊
#learnTS 5. NEVER TYPE Before I knew anything about typescript, when I was using a React useState hook with a default value of empty array, typescript normally infers it to be a never type. I was able to assign it values because a. It wasn't typescript b. noImplicitAny : true
#learnTS 6. UNION ( | ) Think of it like the "or logical operation" but for types. It allows multiple valid types. The type keyword lets you customise types. The autocomplete feature of typescript is seen when types are declared. Will talk more about types tomorrow.
#learnTS 7. TYPE(S) IN TYPESCRIPT If this is confusing, use the hashtag to see where I'm coming from(previous posts). Type is a very important concept in ts. It's very broad. Hovering over your code is good actually to confirm types
#learnTS 1. TYPESCRIPT BASIC TYPES First, let's look at type annotations in Typescript: Implicit and explicit type annotations. We are going to be using explicit type annotation to aid understanding, i.e., we will explicitly tell Typescript what each variable should be🧵
#learnTS 2.. TYPE ANNOTATIONS IN TYPESCRIPT Implicit type annotation === inference It is a very important concept in Typescript, where it guesses the variable type based on your input. For both, the types assigned to a variable, function, parameter, etc, must be consistent.
Thank you for the birthday wishes yesterday 🥹 #learnTS 8. INTERFACE IN TS Interface does the same thing as type but in a different format It is defined as an object. All properties must be used and types must match the said properties.
#learnTS 9. UTILITY TYPES This is a concise way of creating a new type from an already existing type or interface In the pictures below, I use Pick as my example today. The first parameter is the origin type or interface that you want to copy and the second parameter 🧵
Back to my roots😅 #learnTS 12. OPTIONAL VS DEFAULT PARAMETERS Adding "?" after a parameter makes it optional, In the first image with greet("Sarah") the value of age is undefined. Note that optional parameters must always come after required ones, why? Scroll with me
#codecademy #typescript #learnts #ASPNETCore Вот и окончил курс по TypeScript от Codecademy. ASP.Net Core ты следующий 😎
Something went wrong.
Something went wrong.
United States Trends
- 1. Grammy 283K posts
- 2. Clipse 16.9K posts
- 3. Dizzy 9,076 posts
- 4. Kendrick 56.3K posts
- 5. addison rae 21K posts
- 6. olivia dean 13.4K posts
- 7. Katseye 108K posts
- 8. Leon Thomas 16.9K posts
- 9. ravyn lenae 3,533 posts
- 10. AOTY 19.1K posts
- 11. gaga 94.5K posts
- 12. Kehlani 31.9K posts
- 13. #FanCashDropPromotion 3,682 posts
- 14. lorde 11.5K posts
- 15. Alfredo 2 N/A
- 16. Durand 4,911 posts
- 17. #GOPHealthCareShutdown 2,968 posts
- 18. The Weeknd 11.2K posts
- 19. Alex Warren 6,651 posts
- 20. Orban 25.8K posts