Skip to content

Commit 7f2507b

Browse files
committed
standarize casing for TypeScript and JavaScript name references
1 parent 5e9803f commit 7f2507b

File tree

13 files changed

+42
-42
lines changed

13 files changed

+42
-42
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Typescript from Zero
1+
# TypeScript from Zero
22

3-
This repository serves as an interactive guide to Typescript.
3+
This repository serves as an interactive guide to TypeScript.
44
It contains written guides in the form of README.md files, as well as code examples in the form of `.ts` files.
55

66
## Prerequisites
77

88
This course assumes that you have:
99

10-
- Proficiency with Javascript (or minimally any other language)
10+
- Proficiency with JavaScript (or minimally any other language)
1111

1212
Good to have:
1313

14-
- Some experience with Typescript
14+
- Some experience with TypeScript
1515
- VS Code installed
1616

1717
## Setup
1818

1919
```sh
20-
npm install # Install ESLint and Typescript for type-checking in hands-on exercises.
20+
npm install # Install ESLint and TypeScript for type-checking in hands-on exercises.
2121
```
2222

2323
We will be using [Visual Studio Code](https://code.visualstudio.com/) with the following extensions:
@@ -30,7 +30,7 @@ We will be using [Visual Studio Code](https://code.visualstudio.com/) with the f
3030
## Table of Contents
3131

3232
- Basics
33-
1. [Introduction to Typescript](./chapters/1-basics/0-introduction-to-typescript/README.md)
33+
1. [Introduction to TypeScript](./chapters/1-basics/0-introduction-to-typescript/README.md)
3434
1. [Type annotations](./chapters/1-basics/1-type-annotations/README.md)
3535
1. [Inferred types](./chapters/1-basics/2-inferred-types/README.md)
3636
1. [Overriding inferred types](./chapters/1-basics/3-overriding-inferred-types/README.md)
@@ -70,22 +70,22 @@ We will be using [Visual Studio Code](https://code.visualstudio.com/) with the f
7070

7171
### What this course is
7272

73-
- A guide to Typescript syntax and best practices when using Typescript in your codebase
73+
- A guide to TypeScript syntax and best practices when using TypeScript in your codebase
7474

7575
### What this course is not
7676

77-
- A guide to setting up Typescript in your project
78-
- A Javascript tutorial
77+
- A guide to setting up TypeScript in your project
78+
- A JavaScript tutorial
7979

8080
## Credits
8181

8282
This set of course materials was prepared by [Jeff Sieu](https://jeffsieu.com).
8383

84-
Some of the examples and explanations were inspired by the [official Typescript documentation](https://www.typescriptlang.org/docs/).
84+
Some of the examples and explanations were inspired by the [official TypeScript documentation](https://www.typescriptlang.org/docs/).
8585

8686
## Useful resources
8787

88-
- [Typescript for JavaScript programmers](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
89-
- [Typescript playground](https://www.typescriptlang.org/play)
88+
- [TypeScript for JavaScript programmers](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
89+
- [TypeScript playground](https://www.typescriptlang.org/play)
9090
- [Type Challenges (Interactive website)](https://type-challenges.github.io/)
9191
- [Type Challenges (Github)](https://github.com/type-challenges/type-challenges)

chapters/1-basics/0-introduction-to-typescript/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Introduction to Typescript
1+
# Introduction to TypeScript
22

3-
- Typescript is a typed superset of Javascript.
4-
- It adds additional syntax to Javascript to support types.
3+
- TypeScript is a typed superset of JavaScript.
4+
- It adds additional syntax to JavaScript to support types.
55

66
## Benefits
77

chapters/1-basics/1-type-annotations/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ In TypeScript, you can specify the type of a variable, function, or class by add
44

55
This helps you catch bugs in your code before you run it, and makes your code more readable and maintainable.
66

7-
To appreciate the benefits of having types, let's first look at a problem with Javascript.
7+
To appreciate the benefits of having types, let's first look at a problem with JavaScript.
88

9-
## The problem with Javascript
9+
## The problem with JavaScript
1010

11-
Here, we have a Javascript function `add`, which takes in `a` and `b` as parameters, and returns the sum of `a` and `b`. Pretty straightforward.
11+
Here, we have a JavaScript function `add`, which takes in `a` and `b` as parameters, and returns the sum of `a` and `b`. Pretty straightforward.
1212

1313
```ts
14-
// add.js (Javascript)
14+
// add.js (JavaScript)
1515
function add(a, b) {
1616
return a + b;
1717
}
@@ -23,7 +23,7 @@ We know that `a` and `b` should be numbers because we are adding them together.
2323
In fact, we can pass in any value to `add` and it will still run.
2424

2525
```js
26-
// add.js (Javascript)
26+
// add.js (JavaScript)
2727
function add(a, b) {
2828
return a + b;
2929
}
@@ -68,12 +68,12 @@ function add(a: number, b: number): number {
6868
}
6969
```
7070

71-
In Typescript, type annotations are done by adding the type after the variable name, separated by a colon `:`. In this case, we are specifying that `a` and `b` are of type `number`.
71+
In TypeScript, type annotations are done by adding the type after the variable name, separated by a colon `:`. In this case, we are specifying that `a` and `b` are of type `number`.
7272

7373
Here are more examples of type annotations:
7474

7575
```ts
76-
// ORIGINAL: index.js (Javascript)
76+
// ORIGINAL: index.js (JavaScript)
7777
const isActive = true
7878
const message = "Hello, World!"
7979
const age = 25
@@ -83,7 +83,7 @@ function greet(name) {
8383
}
8484

8585
///////////////////////////////////////////
86-
// ANNOTATED: index.ts (Typescript)
86+
// ANNOTATED: index.ts (TypeScript)
8787
const isActive: boolean = true
8888
const message: string = "Hello, World!"
8989
const age: number = 25

chapters/1-basics/11-classes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Classes
22

3-
Classes are a way to implement object-oriented programming in Javascript. They are automatically a type in TypeScript.
3+
Classes are a way to implement object-oriented programming in JavaScript. They are automatically a type in TypeScript.
44

55
```ts
66
class User {

chapters/1-basics/2-inferred-types/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Reference: https://www.typescriptlang.org/docs/handbook/type-inference.html
44
5-
Take a look at the following piece of Typescript code:
5+
Take a look at the following piece of TypeScript code:
66

77
```ts
88

chapters/1-basics/2-inferred-types/exercise-2.1.solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Exercise 2.1: Inferred types
22
// Identify and remove unnecessary type annotations
33

4-
// Note: Typescript should not be complaining (no red squiggles) after
4+
// Note: TypeScript should not be complaining (no red squiggles) after
55
// your changes
66

77
function add(a: number, b: number) {

chapters/1-basics/2-inferred-types/exercise-2.1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Exercise 2.1: Inferred types
22
// Identify and remove unnecessary type annotations
33

4-
// Note: Typescript should not be complaining (no red squiggles) after
4+
// Note: TypeScript should not be complaining (no red squiggles) after
55
// your changes
66

77
function add(a: number, b: number): number {

chapters/1-basics/3-overriding-inferred-types/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Consider the following example, where the type of `useState` is wrongly inferred
3535
```ts
3636
const [name, setName] = useState(null);
3737

38-
// Typescript only allows us to set `name` to `null`
38+
// TypeScript only allows us to set `name` to `null`
3939
setName("Alice"); // Error: Argument of type 'string' is not assignable to parameter of type 'SetStateAction<null>'
4040

4141
```

chapters/1-basics/4-type-aliases/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ function printName(name: Name) {
2020

2121
## Type aliases vs variable declarations
2222

23-
Type aliases are similar to Javascript variable declarations in many ways:
23+
Type aliases are similar to JavaScript variable declarations in many ways:
2424

2525
- They are used to store values for later use
2626
- Type aliases store types for later use
27-
- Javascript variables store values for later use
27+
- JavaScript variables store values for later use
2828

2929
You can think of type aliases as "variables for types".

chapters/1-basics/5-object-types-and-interfaces/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Object types (and interfaces)
22

3-
Often in Javascript, you have something like this:
3+
Often in JavaScript, you have something like this:
44

55
```js
6-
// Javascript
6+
// JavaScript
77
const person = {
88
name: 'Alice',
99
age: 25,
1010
isStudent: true,
1111
};
1212
```
1313

14-
This is how we can type it in Typescript:
14+
This is how we can type it in TypeScript:
1515

1616
```ts
17-
// Typescript
17+
// TypeScript
1818

1919
// Person is an object type
2020
type Person = {
@@ -30,7 +30,7 @@ const person: Person = {
3030
};
3131
```
3232

33-
The syntax for object types is similar to Javascript object literals, except that each key maps to a type instead of a value.
33+
The syntax for object types is similar to JavaScript object literals, except that each key maps to a type instead of a value.
3434

3535
Notice the similarity between the two:
3636

0 commit comments

Comments
 (0)