2023-02-26 01:30

This commit is contained in:
2023-02-26 01:30:37 +09:00
commit 9a13ccbd17
122 changed files with 32148 additions and 0 deletions

1
getting-typescript/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,14 @@
{
"name": "getting-typescript",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"watch": "tsc --watch",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Elex",
"license": "ISC",
"private": true
}

View File

@@ -0,0 +1,9 @@
"use strict";
class Person {
constructor(name) {
this.name = name;
}
}
;
const person = new Person("Charlie");
console.log(`Hello, ${person.name}.`);

View File

@@ -0,0 +1,10 @@
class Person {
name: string;
constructor(name: string) {
this.name = name;
}
};
const person: Person = new Person("Charlie");
console.log(`Hello, ${person.name}.`);

View File

@@ -0,0 +1,18 @@
{
"compilerOptions": {
"strict": true,
"target": "ES6",
"lib": [
"ES2015",
"DOM"
],
"module": "CommonJS"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"outDir": "./out"
}