<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>声明文件 on PlumePHP</title><link>https://plumephp.com/tags/%E5%A3%B0%E6%98%8E%E6%96%87%E4%BB%B6/</link><description>Recent content in 声明文件 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 28 Sep 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/%E5%A3%B0%E6%98%8E%E6%96%87%E4%BB%B6/index.xml" rel="self" type="application/rss+xml"/><item><title>TypeScript 库作者指南：声明文件、API 演进与包发布</title><link>https://plumephp.com/typescript-sdk-package-publishing/</link><pubDate>Mon, 28 Sep 2026 10:00:00 +0800</pubDate><guid>https://plumephp.com/typescript-sdk-package-publishing/</guid><description>&lt;h2 id="引言"&gt;引言&lt;/h2&gt;
&lt;p&gt;「会写 TS 应用」和「会写 TS 库」是两件事。应用只需要「代码能跑」，库还要求「&lt;strong&gt;类型能给别人用&lt;/strong&gt;」：别人 &lt;code&gt;import&lt;/code&gt; 你的包时，&lt;code&gt;npm install&lt;/code&gt; 后 &lt;code&gt;.d.ts&lt;/code&gt; 要能正确解析、泛型要够灵活、API 演进不能破坏旧用户、被 tree-shaking 后不能留垃圾。这就是「库作者」视角。&lt;/p&gt;</description></item></channel></rss>