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
530
掛川城の点群データをiTownsで表示しよう
smellman
0
320
そのJavascript、全部TypeScriptにしちゃえ
smellman
1
230
大容量SSDとOpenStreetMap
smellman
0
150
MapLibreとtile.openstretmap.jpで始めるベクトル地図プログラミング
smellman
1
610
国内向けタイルサーバの構築と運用について
smellman
0
1.5k
Python/Javascriptで読む点群
smellman
1
5.2k
日本のCommunity向け タイルサーバの現状
smellman
0
2.7k
Pythonで点群を読んでみよう
smellman
1
2.6k
Other Decks in Programming
See All in Programming
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
5.8k
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.1k
Kotlin + Power-Assert 言語組み込みならではのAssertion Library採用と運用ベストプラクティス by Kazuki Matsuda/Gen-AX
kazukima
0
110
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
1
320
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.6k
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
4
600
KoogではじめるAIエージェント開発
hiroaki404
1
430
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
3
3.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
440
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1.3k
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
950
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
120
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
A Modern Web Designer's Workflow
chriscoyier
697
190k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.1k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Being A Developer After 40
akosma
91
590k
How GitHub (no longer) Works
holman
315
140k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Balancing Empowerment & Direction
lara
5
740
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
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自体を改修する • 来週いっぱいには修正を終わらせたい