We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c63cfc commit e0ea5c7Copy full SHA for e0ea5c7
2-understand/s6-advanced-types/Makefile
@@ -10,3 +10,6 @@ run-type-guards: ## Run type guards
10
11
run-disc-unions: ## Run discriminated unions
12
@deno run disc-union.ts
13
+
14
+run-type-casting: ## Run type casting
15
+ @deno run type-casting.ts
2-understand/s6-advanced-types/type-casting.ts
@@ -0,0 +1,8 @@
1
+// type casting
2
+// https://www.udemy.com/course/understanding-typescript/learn/lecture/16893896#overview
3
4
+const userInputElement = document.getElementById('user-input');
5
6
+if (userInputElement) {
7
+ (userInputElement as HTMLInputElement).value = 'Hi There!';
8
+}
0 commit comments