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
OpenLayers ext TypeScript declarationの開発
Search
Taro Matsuzawa aka. btm
April 09, 2022
Programming
0
530
OpenLayers ext TypeScript declarationの開発
KoedoLUG 2022/04/09
Taro Matsuzawa aka. btm
April 09, 2022
Tweet
Share
More Decks by Taro Matsuzawa aka. btm
See All by Taro Matsuzawa aka. btm
平成生まれのためのUNIX&IT歴 史講座 ~番外編~
smellman
2
480
掛川城の点群データをiTownsで表示しよう
smellman
0
270
そのJavascript、全部TypeScriptにしちゃえ
smellman
1
200
大容量SSDとOpenStreetMap
smellman
0
120
MapLibreとtile.openstretmap.jpで始めるベクトル地図プログラミング
smellman
1
550
国内向けタイルサーバの構築と運用について
smellman
0
1.2k
Python/Javascriptで読む点群
smellman
1
4.9k
日本のCommunity向け タイルサーバの現状
smellman
0
2.6k
Pythonで点群を読んでみよう
smellman
1
2.4k
Other Decks in Programming
See All in Programming
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
160
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
54
19k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
790
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
670
Introduction to kotlinx.rpc
arawn
0
760
sappoRo.R #12 初心者セッション
kosugitti
0
270
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
0
110
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
980
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
150
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
460
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
280
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Side Projects
sachag
452
42k
The Language of Interfaces
destraynor
156
24k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
640
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Raft: Consensus for Rubyists
vanstee
137
6.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
10
510
Transcript
2022/04/09 1 OpenLayers ext TypeScript declarationの開発 Taro Matsuzawa @smellman KoedoLUG
2022/04/09
2022/04/09 2 自己紹介 • Georepublic Japan シニアデベロッパー兼CISO • 日本UNIXユーザ会会長 •
OSGeo.JP理事 • OpenStreetMap Foundation Japan メンバー • Breakcoreクラスタ • 最近のお気に入りはSynthamesk
2022/04/09 3 TypeScript declarationとは • 既存のJavaScriptライブラリに追加で型情報などを付与する仕組 み • よく yarn
install –dev @types/hogehoge などとして追加 • 型情報があるとコンパイル時にエラーなどを検出される • プログラムの安全性が増す
2022/04/09 4 OpenLayers extとは • https://github.com/Viglino/ol-ext • OpenLayersにいろいろな機能を追加するプラグイン • http://viglino.github.io/ol-ext/
• デモを見ると何ができるかわかる • 仕事上ではフォントアイコンを使いたい
2022/04/09 5 types-ol-ext • OpenLayers extにTypeScriptの定義を追加するためのdeclaration • OpenLayers 6.5.xまで対応 •
OpenLayers 6.14.1には対応されていない • types-ol パッケージに依存 • OpenLayers自体がTypeScript declarationを提供しているため不要のは ず • とりあえず改修をしてみているという話
2022/04/09 6 何をしているのか? • https://github.com/Siedlerchr/types-ol-ext/pull/84 • types-olの依存性を削除、OpenLayersの持つdeclarationを利用 • この段階で500件以上のエラー •
on/once/unイベントの型を改修 • examplesの中身も改修
2022/04/09 7 今のところいい感じです
2022/04/09 8 残タスク • types-ol-ext自体がまだ未実装のイベントがいくつかある • ol-extの実装を読みながら未実装の部分を追加する • examplesでまだ20件ほどのエラー •
だいたいはイベントの未実装部分なので実装をする • OpenLayers自体を拡張している部分があるのでどう対応するか… • examples自体を改修する • 来週いっぱいには修正を終わらせたい