denoもくもく会 #3
2019/03/09(土) 13:00 〜
#deno_ja #denoland
過去の開催記録
* denoもくもく会 #1
* denoもくもく会 #2
keroxp.icon
三行自己紹介
藤沢在住横浜勤務(ロイロ)
TypeScript / Go / Docker / React / AWS
stdコラボレーター
Deno歴2018/12~
https://github.com/keroxp/deno-redis
をv0.3対応した
https://github.com/keroxp/deno-fetch
https://github.com/keroxp/deno-streams
https://github.com/keroxp/deno-request
/keroxp/deno stdにmultipartモジュールが実装された
/keroxp/寝てる間にrevertされていた話
最近やる気を失っていた
code:ts
type Reader = Deno.Reader
今日は何をやるのか未定
供養?
fetch server?
次世代bundler?
原稿ネタ探し
syumai.icon syumai
去年の5月からGo書いてます。前職はReact Native + Rails
Deno / TypeScript歴2018/12~
dailyで dinatra(https://github.com/syumai/dinatra ) と dejs(https://github.com/syumai/dejs ) のCIを回していて、壊れたら直すのをやっています
一旦イベントおじさんをやっている
最近仕事が忙しくなってきている
原稿を挽回したい
ioの話を書いています
hashrock.icon hashrock
Denoファン
普段は組み込み系(C書いたり)
Denobook書いてて進捗が滞ってるので今日挽回したい
4コマ書いてる
ネタを探し中
pikaが気になってるので、denoから使えるようなものなのか調べたい
本当にdenoに対応してた
https://github.com/pikapkg/builders/tree/master/packages/plugin-build-deno/
denobookにwasm周りも言及したいので、ここで入門したい(どこまで使えるようになってるか調べたい)
leko.icon Leko / れこ
https://twitter.com/L_e_k_o
普段はTypeScript / React / React Native / Node.jsやってます
Deno初心者
Dive into Deno:プロセス起動からTypeScriptが実行されるまで | WEB EGG https://blog.leko.jp/post/code-reading-of-deno-boot-process/ を書きました
コンパイラの中身は知ってるけどDeno自体のAPIやコミュニティパッケージ周りの経験値ゼロ
fetch_remote_sourceあたりのなにか(リダイレクトループ検知、弱いキャッシュとか)でコミットしようと思っている
kt3k.icon kt3k
deno prettier を本体の formatting に使う変更
https://github.com/denoland/deno/pull/1708
一旦マージされたが、のちに丸っと revert された https://github.com/denoland/deno/pull/1752
run に env オプションを追加する変更
https://github.com/denoland/deno/pull/1773
ts のバージョンを -v で表示する
https://github.com/denoland/deno/pull/1788
rollup 力
globalEval を止める
https://github.com/denoland/deno/pull/1813
Evaluating JavaScript code via indirect eval call. - Qiita(https://qiita.com/uupaa/items/5b2db5e9e1bc03ecaf7e#in-babel) indirect callについて記事があった(れこ)
gn の args を Deno.version.gnArgs で見れるようにする変更
https://github.com/denoland/deno/pull/1845
今日やりたいこと
週報を書く
deno_license_checker の API update
https://github.com/kt3k/deno_license_checker
prettier option を入れる
https://github.com/denoland/deno_std/issues/236
coverage (時間があれば)
https://github.com/denoland/deno/issues/106
watilde さんの revert された URL の PR を復活させたい
bokuweb bokuweb.icon https://twitter.com/bokuweb17
普段React / TypeScript / Goあたり書いてます
山に生息
Rustが好きです
入門に作ったpretty-assertというassetionがdefaultになってた https://github.com/denoland/deno_std/pull/234
正月に読んだりして入門した https://blog.bokuweb.me/entry/2019/01/11/102706
テスト用のhttp-serverをRustで書き換えようとしてしばらくハマってる
https://github.com/denoland/deno/issues/1453
今日たぶん15:30くらいに上がらせていただきます :pray:
## import の謎
全く同じ物でも、参照するアドレスが変わると別物になってしまう? by keroxp.icon
code:ts
import {BufReader} from "https://deno.land/x/io/bufio.ts"
import {BufReader as BufReader2} from "https://deno.land/x/std/io/bufio.ts"
function func(b: BufReader) {
}
const buf2 = new BufReader2(new Deno.Buffer)
func(buf2)
code:log
Compiling file:///Users/keroxp/Development/tmp/test.ts
/Users/keroxp/Development/tmp/test.ts:9:6 - error TS2345: Argument of type 'import("/Users/keroxp/Library/Caches/deno/deps/https/deno.land/x/std/io/bufio").BufReader' is not assignable to parameter of type 'import("/Users/keroxp/Library/Caches/deno/deps/https/deno.land/x/io/bufio").BufReader'.
Types have separate declarations of a private property 'buf'.
9 func(buf2)
型名がurlでunique化されてる?keroxp.icon
上記エラーをミニマム再現できるts playground: leko.icon https://www.typescriptlang.org/play/#src=class%20A%20{%0D%0A%20%20%20%20name%3A%20string%0D%0A%20%20%20%20private%20meta%3A%20Uint16Array%0D%0A}%0D%0Aclass%20B{%0D%0A%20%20%20%20name%3A%20string%0D%0A%20%20%20%20private%20meta%3A%20Uint16Array%0D%0A}%0D%0A%0D%0Afunction%20getName(arg%3A%20A)%20{%0D%0A%20%20%20%20return%20arg.name%0D%0A}%0D%0A%0D%0AgetName(new%20A())%0D%0AgetName(new%20B())%0D%0A
private / protectedなプロパティを持つクラスだと、すべてのプロパティが同じ型定義だったとしても互換性がなくなる模様
すべてのプロパティがpublicの場合はこのエラーは起きない。なぜだ。
code:ts
import {FormFile} from "https://deno.land/x/multipart/formfile.ts"
import {FormFile as FF} from "https://deno.land/x/std/multipart/formfile.ts"
function func(b: FormFile) {
}
const ff = {
filename: "",
type: "",
size: 0,
} as FF
func(ff)
interfaceならOKだったkeroxp.icon
## ServiceWorker
ES Modulesの解決時に拡張子付けたり、revision付けたり出来るのでは