Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AngularではじめるTypeScript
Search
puku0x
May 15, 2019
Technology
2
360
AngularではじめるTypeScript
FukuokaJS #8
https://fukuokajs.connpass.com/event/129155/
puku0x
May 15, 2019
Tweet
Share
More Decks by puku0x
See All by puku0x
生成AIではじめるテスト駆動開発
puku0x
0
680
実践!カスタムインストラクション&スラッシュコマンド
puku0x
2
2.2k
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
1.4k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
250
ファインディでのGitHub Actions活用事例
puku0x
9
3.6k
Findyの開発生産性向上への取り組み ~Findyフロントエンドの場合~
puku0x
0
450
Findyの開発生産性を上げるためにやったこと
puku0x
1
620
Angularコーディングスタイルガイドはいいぞ
puku0x
1
390
Nx CloudでCIを爆速にした話
puku0x
0
910
Other Decks in Technology
See All in Technology
Modern Data Stack大好きマンが語るSnowflakeの魅力
sagara
0
300
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
1
360
シンプルを極める。アンチパターンなDB設計の本質
facilo_inc
2
1.6k
意外とあった SQL Server 関連アップデート + Database Savings Plans
stknohg
PRO
0
240
「Managed Instances」と「durable functions」で広がるAWS Lambdaのユースケース
lamaglama39
0
170
コミューンのデータ分析AIエージェント「Community Sage」の紹介
fufufukakaka
0
300
eBPFとwaruiBPF
sat
PRO
4
2.4k
プロダクトマネージャーが押さえておくべき、ソフトウェア資産とAIエージェント投資効果 / pmconf2025
i35_267
2
520
バグハンター視点によるサプライチェーンの脆弱性
scgajge12
2
630
Docker, Infraestructuras seguras y Hardening
josejuansanchez
0
150
最近のLinux普段づかいWaylandデスクトップ元年
penguin2716
1
560
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
1.1k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Designing Experiences People Love
moore
143
24k
Optimizing for Happiness
mojombo
379
70k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Docker and Python
trallard
46
3.7k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Raft: Consensus for Rubyists
vanstee
141
7.2k
Typedesign – Prime Four
hannesfritz
42
2.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
GitHub's CSS Performance
jonrohan
1032
470k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
4 Signs Your Business is Dying
shpigford
186
22k
Transcript
Angular(あるいはNestJS) ではじめるTypeScript Fukuoka JS #8
Noriyuki Shinpuku ng-fukuoka organizer @puku0x 2 VEGA corporation Co., Ltd.
3
TypeScript • Superset of JavaScript • Type safety • Strong
tools 4 TypeScript ES201x ES5
5 https://speakerdeck.com/pirosikick/the-state-of-javascript-in-fecf-2018-number-fec-fukuoka
6 https://2018.stateofjs.com/javascript-flavors/typescript/
7
8 Angular
Angular A platform for building modern Web Apps • Move
faster • Scale better • Reach further https://angular.io/ 9
10 Angular Protractor Forms PWA Augury Language Services Router Elements
CDK Universal Karma Labs Compiler i18n Http Material Animations CLI Angular products
11
Type safety 12 function add(a: number, b: number) { return
a + b; } add(1, 2); // 3 add(1, '2'); // Argument of type '"2"' is not assignable to parameter of type 'number'.
Interfaces 13 export interface Todo { id: number; text: string;
enabled: boolean; } export interface OnInit { ngOnInit(): void; }
Example: Life cycle hooks 14 @Component({...}) export class AppComponent implements
OnInit, OnDestroy { ngOnInit() {...} ngOnDestroy() {...} }
Component @Component({ selector: 'app-root', template: `<p>Hello, {{ title }} !</p>`,
}) export class AppComponent { title = 'Angular'; } 15
Decorator 16 @Component({ selector: 'app-sample', template: `<p>Hello, {{ title }}
!</p>`, }) export class SampleComponent { title = 'Angular'; }
tsconfig.json 17 { "compilerOptions": { "target": "es5", "experimentalDecorators": true }
}
Decorators 18 • @Component • @Directive • @Pipe • @Injectable
• @Input / @Output
Generics 19 @Component({ selector: 'app-button', template: ` <button (click)="clickButton.emit(true)">Click</button> `
}) export class SampleComponent { @Output() clickButton = new EventEmitter<boolean>(); }
Example: Dependency injection 20 @Injectable() export class UserService { constructor(private
http: HttpClient) {} fetchUsers() { return this.http.get<User[]>('/users'); } }
Example: RxJS 21 const a: Todo = { id: 1,
text: 'aaa', enabled: false }; const b: Todo = { id: 2, text: 'bbb', enabled: true }; const todos$ = from([a, b]); // Observable<Todo> todos$.pipe( filter(todo => todo.enabled), map(todo => todo.text) ).subscribe(text => console.log(text)); // 'bbb'
22 https://next.angular.io/getting-started
for backend? 23
24 https://nestjs.com
25
Controller 26 @Controller('cats') export class CatsController { @Get() findAll(): string
{ return 'This action returns all cats'; } }
Entity (TypeORM) 27 @Entity() export class Photo { @PrimaryGeneratedColumn() id:
number; @Column({ length: 500 }) name: string; }
@puku0x Noriyuki Shinpuku ng-fukuoka organizer Thank you! 28