• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

GoogleChrome/chrome-types: Code to parse Chrome's internal extension type de ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

GoogleChrome/chrome-types

开源软件地址:

https://github.com/GoogleChrome/chrome-types

开源编程语言:

JavaScript 100.0%

开源软件介绍:

chrome-types

codecov

⚠️ If you're looking for TypeScript definitions for Chrome's extensions, you should depend on chrome-types in your project.

This repo contains JS which parses Chrome's internal extension definitions and outputs TypeScript Definition files. You shouldn't depend on this code: rather, the generated types file is published at chrome-types. Depend on it for your Chrome extensions projects (MV3 and above).

Design

This repo's design is documented in the wiki. Broadly, it reads Chromium's source code to find the internal extensions definitions (in IDL and JSON) and traverses them to generate ".d.ts" files—one for modern extension development (MV3+), and one for all extensions (including the deprecated Platform Apps APIs).

Deploy

This code is run automatically on a daily basis by GitHub Actions. It prepares a ".d.ts" file for Chrome's HEAD revision, annotated with information about the public Chrome release API first became available in, and publishes a new version if the output differs from the previous release.

Usage

This repository is mostly intended as an implementation detail of the https://developer.chrome.com site and for publishing chrome-types on NPM, which happens automaticalty as part of a GitHub Action. You can run it yourself, but if you're just interested in the generated types, you don't need to.

Run "tools/prepare.js" to generate a bundle of JSON representing Chrome's extensions at a specific release. You can then pass this bundle to other tools like "tools/render-tsd.js". See the wiki for more.

Running the code requires Node 16+ as well as a working version of Python (3 is preferred, but 2.7+ should work) installed on your system. This has only been tested on Linux and macOS. Python is used to convert Chromium's internal IDL format to JSON.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
L018/Trace: A Chrome extension for web analytics发布时间:2022-04-20
下一篇:
Privacy-Managers/Privacy-Manager: Privacy Manager - Chrome extension发布时间:2022-04-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap