Deno 1.6正式發佈!支持編譯成單個可執行文件,蘋果M1可原生運行

{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"近日,Deno 1.6.0正式發佈。這一版本包含一些主要特性升級和許多錯誤修復,包括最受開發者關注的deno compile也取得了階段性成果,現在Deno終於可以支持將TypeScript編譯成單個可執行文件了。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以下是"},{"type":"text","text":"本次版本更新的"},{"type":"text","text":"要點一覽:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"構建自包含的獨立二進制文件:"},{"type":"link","attrs":{"href":"https:\/\/deno.land\/posts\/v1.6#codedeno-compilecode-building-self-contained-standalone-binaries","title":"xxx","type":null},"content":[{"type":"text","text":"deno compile可以將Deno項目構建爲完全獨立的可執行文件"}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/deno.land\/posts\/v1.6#built-in-deno-language-server","title":"xxx","type":null},"content":[{"type":"text","text":"內置的Deno語言服務器"}]},{"type":"text","text":":用於代碼編輯器的完全集成LSP"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對Mac Arm64的實驗性支持:發佈了可在蘋果新款M1芯片上原生運行的二進制文件。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果你已經安裝了Deno,則運行deno upgrade即可升級到1.6版本。如果你是第一次安裝Deno,可以使用下面列出的幾種方法:"}]},{"type":"codeblock","attrs":{"lang":"shell"},"content":[{"type":"text","text":"# Using Shell (macOS and Linux):\ncurl -fsSL https:\/\/deno.land\/x\/install\/install.sh | sh\n\n\n# Using PowerShell (Windows):\niwr https:\/\/deno.land\/x\/install\/install.ps1 -useb | iex\n\n\n# Using homebrew (MacOS):\nbrew install deno\n\n\n# Using Scoop (Windows):\nscoop install deno\n\n\n# Using Chocolatey (Windows):\nchoco install deno\n\n\n# Build from source using cargo\ncargo install "}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"新特性和更改"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"deno compile:獨立的自包含二進制文件"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/28\/c4\/283963b46156e174bcab056c2d3327c4.gif","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Deno開發團隊希望在Deno CLI中提供一個好用的實用工具鏈,deno fmt和deno lint就是其中的例子。現在,Deno工具鏈終於添加了另一個開發工具:deno compile。"},{"type":"text","marks":[{"type":"strong"}],"text":"deno compile對Deno來說,和Node裏面的nexe或pkg的作用是一樣的:從JavaScript或TypeScript源代碼創建獨立的自包含二進制文件。這也是Deno問題跟蹤器上最受關注的一個問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"它的工作機制是這樣的:"}]},{"type":"codeblock","attrs":{"lang":"shell"},"content":[{"type":"text","text":"$ deno compile --unstable https:\/\/deno.land\/[email protected]\/http\/file_server.ts\nCheck https:\/\/deno.land\/[email protected]\/http\/file_server.ts\nBundle https:\/\/deno.land\/[email protected]\/http\/file_server.ts\nCompile https:\/\/deno.land\/[email protected]\/http\/file_server.ts\nEmit file_server\n\n\n$ .\/file_server\nHTTP server listening on http:\/\/0.0.0.0:4507\/"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"與Deno中的所有新特性一樣,deno compile需要--unstable標誌,因爲短期內這個接口可能會迎來重大更改。如果你有任何反饋,請在"},{"type":"link","attrs":{"href":"https:\/\/discord.gg\/deno","title":"xxx","type":null},"content":[{"type":"text","text":"Deno discord"}]},{"type":"text","text":"中發表評論,或在Deno"},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues","title":"xxx","type":null},"content":[{"type":"text","text":"問題跟蹤器"}]},{"type":"text","text":"上創建功能請求問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有關該實現的詳細信息,參見#8539("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/pull\/8539","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/pull\/8539"}]},{"type":"text","text":")。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"當前限制"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前,使用deno compile時可能會遇到一些限制。如果你遇到了以下情況,請在對應的跟蹤問題中提交反饋。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當前不支持Web Worker。此特性的跟蹤問題是#8654("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8654","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8654"}]},{"type":"text","text":")。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你不能在動態導入中動態包含代碼。此特性的跟蹤問題是#8655("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8655","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8655"}]},{"type":"text","text":")。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自定義V8標誌和沙箱權限當前無法實現。此特性的跟蹤問題是#8656("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8656","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8656"}]},{"type":"text","text":")。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"未來計劃"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你可能已經注意到,與其他爲JS創建獨立自包含二進制文件的工具(如pkg)不一樣的是,deno compile沒有可用於打包資產的虛擬文件系統。Deno開發團隊表示,"},{"type":"text","marks":[{"type":"strong"}],"text":"希望隨着將來一些TC39提案(例如import assertions和asset references)的引入,可以不再需要虛擬文件系統,因爲屆時資產可以在JS模塊圖中正確表示。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前來說,deno compile子命令不支持跨平臺編譯"},{"type":"text","text":","},{"type":"text","text":"特定平臺的編譯必須在該平臺上進行。如果有需求,"},{"type":"text","text":"Deno開發團隊"},{"type":"text","text":"想使用一個--target標誌,爲編譯時添加針對不同架構交叉編譯的功能。這個跟蹤問題是#8567("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8567","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8567"}]},{"type":"text","text":")。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"由於當前二進制文件打包的工作機制,二進制文件中包含了許多不必要的代碼。"},{"type":"text","text":"經"},{"type":"text","text":"初步測試,除去這些不必要的代碼後,可以將二進制文件的最終大小減少約60%(減到20MB左右)。目前"},{"type":"text","text":"Deno開發團隊"},{"type":"text","text":"正在做這方面的工作(例如#8640,"},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/pull\/8640","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/pull\/8640"}]},{"type":"text","text":")。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"內置Deno語言服務器"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/d1\/ac\/d15361b6f469c48c11644e2df01398ac.gif","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Deno 1.6附帶了一個新的deno lsp子命令,該子命令提供了一個實現"},{"type":"link","attrs":{"href":"https:\/\/microsoft.github.io\/language-server-protocol\/","title":"xxx","type":null},"content":[{"type":"text","text":"LSP語言服務器協議"}]},{"type":"text","text":"的語言服務器。LSP使編輯器可以與Deno通信,以提供各種高級功能,例如代碼自動完成、linting和懸停文檔等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這個新的deno lsp子命令尚未製作完成,但是它實現了許多主要的LSP功能:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼完成"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"懸停提示"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"轉到定義"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"轉到引用"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"deno fmt集成"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"deno lint整合"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/marketplace.visualstudio.com\/items?itemName=denoland.vscode-deno","title":"xxx","type":null},"content":[{"type":"text","text":"Deno VSCode擴展"}]},{"type":"text","text":"尚不支持deno lsp。它比新生的deno lsp提供的功能還是豐富許多。但是,隨着LSP越來越成熟,預計這種情況將在未來幾周內改變。現在,如果你要使用VSCode嘗試deno lsp,則必須安裝"},{"type":"link","attrs":{"href":"https:\/\/marketplace.visualstudio.com\/items?itemName=denoland.vscode-deno-canary","title":"xxx","type":null},"content":[{"type":"text","text":"VSCode Deno Canary"}]},{"type":"text","text":"。在嘗試這個新擴展之前,請確保Deno 1.6已安裝,並禁用這個擴展的舊版本,否則診斷可能會重複。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"要跟蹤開發進度,請查看問題#8643("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8643","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8643"}]},{"type":"text","text":")。#8643完成後,"},{"type":"text","text":"Deno開發團隊"},{"type":"text","text":"將發佈使用deno lsp的新版vscode-deno。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"遷移到更嚴格的類型檢查"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在Deno 1.4中,--unstable引入了一些更嚴格的TypeScript類型檢查,使開發團隊能夠將一堆代碼從JS移到Rust中(從而大大提升了TypeScript的編譯和打包性能)。在Deno 1.5中,默認情況下爲每個人都啓用了這些更嚴格的類型檢查,並且給出了\"isolatedModules\": flase的TypeScript編譯器選項,以便開發人員選擇關閉。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在這一版本中,這個選項已被移除。現在,所有TypeScript代碼都使用\"isolatedModules\": true運行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"關於此特性的更多詳細信息,請參見Deno 1.5博客文章("},{"type":"link","attrs":{"href":"https:\/\/deno.land\/posts\/v1.5#stricter-type-checks-in-stable","title":"","type":null},"content":[{"type":"text","text":"https:\/\/deno.land\/posts\/v1.5#stricter-type-checks-in-stable"}]},{"type":"text","text":")。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"TypeScript 4.1"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Deno 1.6附帶了TypeScript的最新穩定版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有關Typescript 4.1中新特性的更多信息,請參見TypeScript 4.1發佈文章。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"金絲雀頻道"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一些高級用戶想要在下一個穩定的Deno版本發佈之前測試錯誤修復和新特性,針對這些用戶,Deno開發團隊提供了一個canary更新通道。這裏每天會發布多個金絲雀版本,在Deno存儲庫的"},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/tree\/master","title":"xxx","type":null},"content":[{"type":"text","text":"master分支"}]},{"type":"text","text":"上每提交一次就更新一個版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你可以通過版本末尾的7字符提交哈希,以及deno --version輸出中的canary字符串來識別這些發行版。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從Deno 1.6開始,你可以切換到金絲雀頻道,運行deno upgrade,--canary下載最新的金絲雀版本。你可以使用deno upgrade --canary --version 5eedcb6b8d471e487179ac66d7da9038279884df跳轉到特定的提交哈希。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"警告:在金絲雀版本之間跳轉或降級爲穩定版本可能會損壞你的DENO_DIR。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可以從"},{"type":"link","attrs":{"href":"https:\/\/dl.deno.land下載canary版本的zip文件","title":"","type":null},"content":[{"type":"text","text":"https:\/\/dl.deno.land"}]},{"type":"text","text":"下載金絲雀版本的zip文件。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"金絲雀尚不支持aarch64-apple-darwin構建。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"對Mac Arm64的實驗性支持"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用蘋果搭載M1處理器的新Mac設備的用戶將能原生運行Deno了。在發行zip文件中,開發團隊通過LLVM target triple aarch64-apple-darwin來引用這個目標。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該目標仍被認爲是實驗性的,因爲它是用Rust nightly構建(我們通常使用Rust穩定版),並且團隊尚無自動化CI流程來構建和測試這個目標。不過M1上的Deno完全通過了測試套件,因此團隊還是挺有信心的,認爲它會帶來比較順滑的體驗。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以M1爲目標的rusty_v8 v0.14.0的二進制文件也提供了相同的警告("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/rusty_v8\/releases\/tag\/v0.14.0","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/rusty_v8\/releases\/tag\/v0.14.0"}]},{"type":"text","text":")。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"std\/bytes的更改"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"作爲標準庫工作組("},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/issues\/8405","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/issues\/8405"}]},{"type":"text","text":")工作的一部分;std\/bytes模塊已做了大修。這是穩定Deno標準庫的第一步。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"大多數API都被重命名,以更好地與Array上可用的API保持一致:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"copyBytes -> copy"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"equal -> equals"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"findIndex -> indexOf"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"findLastIndex -> lastIndexOf"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"hasPrefix -> startsWith"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"hasSuffix -> endsWith"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"完整的發行說明(包括錯誤修復)參加此處:"},{"type":"link","attrs":{"href":"https:\/\/github.com\/denoland\/deno\/releases\/tag\/v1.6.0中找到","title":"","type":null},"content":[{"type":"text","text":"https:\/\/github.com\/denoland\/deno\/releases\/tag\/v1.6.0"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"原文鏈接:"},{"type":"link","attrs":{"href":"https:\/\/deno.land\/posts\/v1.6","title":"","type":null},"content":[{"type":"text","text":"https:\/\/deno.land\/posts\/v1.6"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章