{"id":20119892,"url":"https://github.com/supermonster003/autojs6-typescript-declarations","last_synced_at":"2025-05-06T14:32:52.113Z","repository":{"id":113095095,"uuid":"423659525","full_name":"SuperMonster003/AutoJs6-TypeScript-Declarations","owner":"SuperMonster003","description":"AutoJs6 声明文件 (d.ts)  AutoJs6 TypeScript Declarations","archived":false,"fork":false,"pushed_at":"2023-12-02T06:04:13.000Z","size":9242,"stargazers_count":41,"open_issues_count":4,"forks_count":24,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T20:50:26.181Z","etag":null,"topics":["autojs","declarations","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuperMonster003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-02T00:38:32.000Z","updated_at":"2025-04-17T12:31:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"65d774ae-033a-4c70-ae53-d221c898863e","html_url":"https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMonster003%2FAutoJs6-TypeScript-Declarations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMonster003%2FAutoJs6-TypeScript-Declarations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMonster003%2FAutoJs6-TypeScript-Declarations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMonster003%2FAutoJs6-TypeScript-Declarations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperMonster003","download_url":"https://codeload.github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252703465,"owners_count":21790890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autojs","declarations","typescript"],"created_at":"2024-11-13T19:17:39.487Z","updated_at":"2025-05-06T14:32:51.075Z","avatar_url":"https://github.com/SuperMonster003.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--suppress HtmlDeprecatedAttribute, HttpUrlsUsage --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://s1.imagehub.cc/images/2023/03/24/c5f6f649b6ed3aae341966a92fca2747.md.png\" alt=\"autojs6-ts-declarations-banner_1024×310\" border=\"0\" width=\"496\" /\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003eAutoJs6 声明文件 (d.ts)\u003c/p\u003e\n  \u003cp\u003eTypeScript Declarations for AutoJs6\u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"http://dts-project.autojs6.com/blob/main/package.json\"\u003e\u003cimg alt=\"Version name\" src=\"https://img.shields.io/badge/dynamic/json?color=534BAE\u0026label=version\u0026query=%24.version\u0026url=https%3A%2F%2Fraw.githubusercontent.com%2FSuperMonster003%2FAutoJs6-TypeScript-Declarations%2Fmaster%2Fpackage.json\"/\u003e\u003c/a\u003e\n    \u003ca href=\"http://dts-issues.autojs6.com\"\u003e\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/SuperMonster003/AutoJs6-TypeScript-Declarations?color=009688\"/\u003e\u003c/a\u003e\n    \u003ca href=\"http://project.autojs6.com\"\u003e\u003cimg alt=\"GitHub AutoJs6 repository\" src=\"https://img.shields.io/badge/autojs6-\u003e=6.3.3-388E3C\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/topics/javascript\"\u003e\u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/SuperMonster003/AutoJs6-TypeScript-Declarations?color=3178C6\"/\u003e\u003c/a\u003e\n   \u003cbr\u003e\n    \u003ca href=\"https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/commit/f8250babdb161e12ad2e14c73e8aa2b5d7d89cbc\"\u003e\u003cimg alt=\"Created\" src=\"https://img.shields.io/date/1635813883?color=C56000\u0026label=created\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/blob/main/LICENSE\"\u003e\u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/SuperMonster003/AutoJs6-TypeScript-Declarations?color=C63F17\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/find/master\"\u003e\u003cimg alt=\"GitHub Code Size\" src=\"https://img.shields.io/github/languages/code-size/SuperMonster003/AutoJs6-TypeScript-Declarations?color=795548\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.jetbrains.com/?from=AutoJs6-TypeScript-Declarations\"\u003e\u003cimg alt=\"JetBrains supporter\" src=\"https://img.shields.io/badge/supporter-JetBrains-ee4677\"/\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n******\n\n### 功能简介\n\n******\n\n实现或增强开发工具的代码智能补全功能:\n\n* AutoJs6 版本: [不低于 6.3.3](http://download.autojs6.com)\n* 支持的开发工具: [VSCode](https://code.visualstudio.com/download) / [WebStorm](https://www.jetbrains.com/webstorm/download/) / [HBuilderX](https://www.dcloud.io/hbuilderx.html) ...\n\n******\n\n### 样例展示\n\n******\n\n\u003cdetails\u003e\u003csummary\u003e点击展开或收起样例展示\u003c/summary\u003e\n   \u003cdiv align=\"center\"\u003e\n      \u003cbr\u003e\n      \u003cimg src=\"https://s1.imagehub.cc/images/2023/03/24/3bbae966e4c0cbe611de7cf9dffb8150.gif\" alt=\"autojs6-ts-declarations-demo\" border=\"0\"/\u003e\n   \u003c/div\u003e\n\u003c/details\u003e\n\n******\n\n### 使用说明\n\n******\n\n#### [ 1 ] - 获取声明文件 (d.ts) 的主目录\n\n可以从 NPM 或 GitHub 获取主目录.\n\n##### 从 NPM 获取 (推荐)\n\n```shell\nnpm i @sm003/autojs6-dts\n```\n\n安装后, 定位到 `/node_modules/@sm003/autojs6-dts/declarations`.\n\n##### 从 GitHub 获取\n\n[下载最新项目 zip 数据包](https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/archive/main.zip), 解压后得到 `declarations` 文件夹.\n\n#### [ 2 ] - 放置声明文件的主目录\n\n\u003e 如使用 WebStorm, 此步骤可略过.\n\n将主目录放置到项目的任意目录中.\n\n假设用户有一个名为 `hello` 的项目, 项目目录结构如下:\n\n\u003e hello / images / ...  \n\u003e hello / docs / ...  \n\u003e hello / main.js  \n\u003e hello / project.json  \n\u003e ... ...\n\n则 `declarations` 主目录支持以下方式放置:\n\n\u003e hello / declarations / (推荐)  \n\u003e hello / images / declarations /  \n\u003e hello / docs / declarations /  \n\u003e hello / ... / ... / declarations /\n\n但不能放置在项目的同级或上级目录中.\n\n#### [ 3 ] - 实现或增强代码智能补全\n\n开发工具会自动识别并开始索引所有声明文件.\n\n索引完成后开始编写代码并体验代码智能提示.\n\n\u003e 注: 部分编辑器可能需要重新启动才能开始声明文件的索引.\n\n#### [ 4 ] - VSCode 编辑器的额外配置\n\nVSCode 可能无法像 WebStorm 一样识别任意位置的 declarations 文件夹, 尤其是使用 npm 命令部署后, declarations 文件夹更是难以被 VSCode 默认识别. 因此需要将 [jsconfig.json](https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/blob/main/jsconfig.json) 文件复制到项目根目录中, 如:\n\n\u003e hello / mode_modules / @sm003 / autojs6-dts / ...  \n\u003e hello / jsconfig.json  \n\u003e hello / main.js  \n\u003e ... ...\n\n如果项目中本身已存在 jsconfig.json 文件, 只需将下列配置合并到已有文件即可:\n\n```json\n{\n  \"compilerOptions\": {\n    \"typeRoots\": [\n      \"./node_modules/@sm003/autojs6-dts/declarations\",\n      \"./declarations\"\n    ]\n  }\n}\n```\n\n重启 VSCode 后, 示例中的 `hello/main.js` 可实现或增强代码智能补全.\n\n******\n\n### 获取更新\n\n******\n\n从 NPM 直接获取更新:\n\n```shell\nnpm update @sm003/autojs6-dts\n```\n\n如需检查更新, 除直接到 [当前项目主页](http://dts-project.autojs6.com) 查看外, 还可定位到项目根目录的 package.json 文件, 鼠标悬停在 @sm003/autojs6-dts 依赖项的版本值处, 在浮动窗口中可查看是否存在版本更新. 另外 VSCode 也可借助 [Version Lens](https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens) 插件实现版本更新检查.\n\n通常情况下, [AutoJs6](http://autojs6.com) 发布版本更新后, 声明文件项目也会伴随更新.\n\n******\n\n### 版本历史\n\n******\n\n[comment]: \u003c\u003e (Version history only shows last 3 versions)\n\n# v2.1.3\n\n###### 2023/12/02\n\n* `新增` opencc 模块声明文件\n* `优化` 完善 ocr 章节缺失的 detect 及 recognizeText 声明\n* `优化` 适配 AutoJs6 6.5.0\n* `依赖` 附加 Android OpenCC 声明文件版本 1.2.0\n* `依赖` 升级 Android dx 声明版本 1.11 -\u003e 1.14\n* `依赖` 降级 Jackson DataBind 声明版本 2.14.3 -\u003e 2.13.3\n* `依赖` 降级 Apache Commons IO 声明文件版本 2.14.0 -\u003e 2.8.0\n\n# v2.1.2\n\n###### 2023/10/30\n\n* `新增` shizuku 模块声明文件\n* `新增` barcode 模块声明文件\n* `新增` qrcode 模块声明文件\n* `优化` 适配 AutoJs6 6.4.0\n\n# v2.1.1\n\n###### 2023/07/21\n\n* `优化` 适配 AutoJs6 6.3.3\n\n##### 更多版本历史可参阅\n\n* [CHANGELOG.md](https://github.com/SuperMonster003/AutoJs6-TypeScript-Declarations/blob/main/docs/CHANGELOG.md)\n\n******\n\n### 相关项目\n\n******\n\n[Android d.ts Generator](https://github.com/NativeScript/android-dts-generator) by [NativeScript](https://github.com/NativeScript)\n\n- 由 jar 文件生成 d.ts 声明文件的工具\n\n[AutoJs6-VSCode-Extension](http://vscext-project.autojs6.com) by [SuperMonster003](https://github.com/SuperMonster003)\n\n- AutoJs6 调试器 (VSCode 平台插件)\n\n******\n\n### 打赏 (Tip)\n\n******\n\n\u003cdetails\u003e\u003csummary\u003e查看详情 (Click to show details)\u003c/summary\u003e\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\nTo tip online, scan the QR code below \u003cbr\u003e\n扫描对应二维码可打赏 \u003cbr\u003e\u003cbr\u003e\nI believe I could make it better with your support :) \u003cbr\u003e\n感谢每一份支持和鼓励 \u003cbr\u003e\u003cbr\u003e\n\n\u003ca href=\"https://s1.imagehub.cc/images/2023/03/24/83583b97ee8c4d3f7d7acfbe0c60bb8d.png\"\u003e\u003cimg src=\"https://s1.imagehub.cc/images/2023/03/24/83583b97ee8c4d3f7d7acfbe0c60bb8d.png\" alt=\"qr-alipay-sponsor_521×648\" height=\"224\" border=\"0\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://s1.imagehub.cc/images/2023/03/24/de74a1d70a60d656431fc5625882f821.png\"\u003e\u003cimg src=\"https://s1.imagehub.cc/images/2023/03/24/de74a1d70a60d656431fc5625882f821.png\" alt=\"qr-wechat-sponsor_521×648\" height=\"224\" border=\"0\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003c/details\u003e\n\n[//]: # (\n    # -----------------------------------------#\n    #               npm commands               #\n    # -----------------------------------------#\n    - User initialization\n        - npm adduser sm003\n    - Pack [ not necessary for publishing ]\n        - npm pack\n    - Publish\n        - npm publish --access public\n)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupermonster003%2Fautojs6-typescript-declarations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupermonster003%2Fautojs6-typescript-declarations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupermonster003%2Fautojs6-typescript-declarations/lists"}