npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wps-airscript-types

v1.0.0

Published

WPS AirScript Api TypeScript类型申明, 包含v1.0和v2.0

Readme

wps-airscript-types

WPS Airscript TypeScript类型定义。以便在IDE中可以使用代码提示。
非官方项目,但是从金山文档网页中的源代码解析生成,使用方法与官方文档一致。

官方文档:AirScript文档

安装

npm install wps-airscript-types

使用

在你的项目根目录下新建airscript.d.ts文件,内容如下:

/// <reference path="./node_modules/wps-airscript-types/types/Context.d.ts" />

/// <reference path="./node_modules/wps-airscript-types/types/ApiV1.d.ts" />

如果你需要使用V2版本的API,只需要将ApiV1.d.ts替换为ApiV2.d.ts即可。

配置tsconfig.json文件,添加include值:

{
    "include": ["airscript.d.ts"],
}

然后就可以在代码中使用类型声明和代码提示了。

如何提取最新类型定义

source

如图,以多维表为例。

  1. 打开金山文档网页版多维表或者智能表格编辑页。
  2. 打开AirScript脚本编辑器,进入脚本编辑模式。
  3. 打开浏览器控制台,在Sources选项卡中,在db_script_ide下面搜寻类型定义代码,如图中的文件名是468.70fb31cf.js,随着wps的更新,文件名可能会变,需要自己逐个排查。
  4. 复制特定区块代码,如图中选中颜色区所示,注意开头和结尾,将其放入该项目的source.txt中。
  5. 运行npm run build,即可在types文件夹下生成v1和v2版本的类型定义,可将其复制到自己的项目中。