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
590
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
520
掛川城の点群データをiTownsで表示しよう
smellman
0
310
そのJavascript、全部TypeScriptにしちゃえ
smellman
1
230
大容量SSDとOpenStreetMap
smellman
0
150
MapLibreとtile.openstretmap.jpで始めるベクトル地図プログラミング
smellman
1
600
国内向けタイルサーバの構築と運用について
smellman
0
1.5k
Python/Javascriptで読む点群
smellman
1
5.2k
日本のCommunity向け タイルサーバの現状
smellman
0
2.7k
Pythonで点群を読んでみよう
smellman
1
2.5k
Other Decks in Programming
See All in Programming
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
3
5.5k
CSC509 Lecture 08
javiergs
PRO
0
230
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
120
CSC509 Lecture 05
javiergs
PRO
0
310
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.1k
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
770
理論と実務のギャップを超える
eycjur
0
170
Six and a half ridiculous things to do with Quarkus
hollycummins
0
210
なぜGoのジェネリクスはこの形なのか? - Featherweight Goが明かす設計の核心
qualiarts
0
230
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
A better future with KSS
kneath
239
18k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
610
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
YesSQL, Process and Tooling at Scale
rocio
173
15k
For a Future-Friendly Web
brad_frost
180
10k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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自体を改修する • 来週いっぱいには修正を終わらせたい