Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TypeScript + GASでAPIを作る / Build API with TypeS...
Search
shike
April 11, 2019
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript + GASでAPIを作る / Build API with TypeScript and GAS
Cluexの社内LT大会で発表した時の資料です。
shike
April 11, 2019
More Decks by shike
See All by shike
Code Generatorを作ってコンポーネントを自動生成しよう / Let's make code generator
shike0909
1
2.3k
Nuxt + TypeScriptで SPAを作る / Build SPA with Nuxt and TypeScript
shike0909
0
150
Lighthouseを使った認証必須のGraphQL API / GraphQL API authentication with Lighthouse
shike0909
0
2.3k
Reduxについて / Redux introduction and TODO example with Redux
shike0909
0
130
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
0
300
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
770
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
120
Modding RubyKaigi for Myself
yui_knk
0
900
RTSPクライアントを自作してみた話
simotin13
0
510
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
510
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
170
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
3
120
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
310
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
160
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
240
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
The Cult of Friendly URLs
andyhume
79
6.9k
The Invisible Side of Design
smashingmag
302
52k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
Code Review Best Practice
trishagee
74
20k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
210
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
570
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
sira's awesome portfolio website redesign presentation
elsirapls
0
270
Transcript
TypeScript + GASで APIを作る Cluex Webグループ 柴山健吾
話すこと • GASでアプリケーションを作る • claspについて • TypeScriptについて • clasp +
TypeScriptでAPIを開発してみる
GASでアプリケーションを作る • Spread SheetsとかGoogle製品のAPIを使ってあんなこ とやこんなことできる • でも普通に作ろうとするとつらい ◦ ローカルで開発できない ◦
バージョン管理できない ◦ 補完も何も効かないザコい専用エディター
GASでアプリケーションを作る
clasp
claspとは • ローカルで開発できる ◦ バージョン管理できる • コマンド一つでデプロイできる • TypeScriptで開発できる!!!
_人人人人人人人人人人人人人人人人_ > TypeScriptで開発できる!! <  ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄
TypeScript • 静的型付けをJavaScriptにもたらす JSのスーパーセット • 既存のJSコードをそのまま使っても動作する • JSコードにトランスパイルするので、 型情報はトランスパイル時に失われる •
そのため実行時には型は保証されない
clasp + TypeScriptで開発してみる Googleカレンダーから1週間の予定を取得して JSONで返すAPIを作ってみた
claspのインストールとログイン
Google Apps Script APIをオンに https://script.google.com/home/usersettings
ローカル環境初期設定
tsconfig.jsonを作成
src/appscript.jsonのtimeZoneを修正
src/Code.tsを実装
src/Code.t s を実装
src/Code.tsを実装
コードをデプロイ
公開
公開
公開URLを叩く
まとめ • clasp使えば自分の好きな開発環境で GASアプリケーションが開発できるし バージョン管理もできる • TypeScriptによる型付けで補完が効いて開発が捗る • 型安全による安心感 •
静的型付けは正義
ご清聴ありがとうございました