Web appOpen in Telegram
JJavaScript/Node.js 台灣
JavaScript/Node.js 台灣
@JavaScriptTw · group · Tech · indexed since 2026-07-05 archive for June 2020
1 999members−15 in a week
4writing in 30 days
15messages in 30 days
103 295messages in the index

Messages from June 2020

‹ June 2020 ›×
T
或是換句話說雖然他有解決不確定性,但是 TS 讀不懂,所以才需要加驚嘆號(也給了很多討厭 TS 的人一個可以盡量噴的理由
フ
你的意思是你們可以靠 TS 跟強型別後端完全對接上?
  1. T
    有人致力在解決這個問題,我有看過對岸有一些人處理得還算不錯,但是沒有到很漂亮,所以沒有繼續研究。
    1. フ
      如果能從後端 auto gen 出 d.ts 給 api.js 用 那我覺得我會願意在 api.js 那個 module 用 ts
Whole thread · 2 replies →
T
說到這個,Dr. Axel 最近有一篇文章
T
他們在後端直接定義好型別然後透過工具鏈的方式自動把型別同步到前端
T
如果是前後端 monorepo 然後用同一種語言的話,就可以比較簡單處理這個問題
T
類似 — —backend —frontend —shared
T
把共用的部分都放在 shared 然後兩者再從 share import (包含 type)
T
是沒錯,所以就比較麻煩,只能分開定義,不然就要去搞自動產生型別的做法

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count