{"id":19153553,"url":"https://github.com/claviz/dts-extractor","last_synced_at":"2025-05-07T06:28:10.178Z","repository":{"id":35540948,"uuid":"218284000","full_name":"Claviz/dts-extractor","owner":"Claviz","description":"Extract definition files from local node modules.","archived":false,"fork":false,"pushed_at":"2023-03-02T03:31:00.000Z","size":547,"stargazers_count":7,"open_issues_count":13,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:05:31.128Z","etag":null,"topics":["dts","extractor","type-definitions"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Claviz.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-29T12:40:29.000Z","updated_at":"2025-02-07T05:21:42.000Z","dependencies_parsed_at":"2024-11-09T08:35:13.001Z","dependency_job_id":null,"html_url":"https://github.com/Claviz/dts-extractor","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.4545454545454546,"last_synced_commit":"d63840d584ef69f7b4ab2521ed1ff3c7ffc466ec"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Claviz%2Fdts-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Claviz%2Fdts-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Claviz%2Fdts-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Claviz%2Fdts-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Claviz","download_url":"https://codeload.github.com/Claviz/dts-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252826272,"owners_count":21810086,"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":["dts","extractor","type-definitions"],"created_at":"2024-11-09T08:23:27.431Z","updated_at":"2025-05-07T06:28:10.150Z","avatar_url":"https://github.com/Claviz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dts-extractor [![Build Status](https://travis-ci.org/Claviz/dts-extractor.svg?branch=master)](https://travis-ci.org/Claviz/dts-extractor) [![codecov](https://codecov.io/gh/Claviz/dts-extractor/branch/master/graph/badge.svg)](https://codecov.io/gh/Claviz/dts-extractor) ![npm](https://img.shields.io/npm/v/dts-extractor.svg)\n\nExtract definition files from local node modules.\n\n## Installation \u0026 Usage\n\n`npm install dts-extractor`\n\nUsage:\n\n```js\nconst dtsExtractor = require('dts-extractor');\n\n(async () =\u003e {\n    const dts = await dtsExtractor.getDts({\n        nodeModulesPath: './node_modules', // path in file system where packages located\n        packages: ['xlstream', '@types/moment'], // list of packages \n    });\n})();\n```\n\n### Usage with Monaco Editor\n\nOne of the use-cases for this package is to supply custom typings for Monaco Editor. When typings are extracted as shown in the code snippet above, they can be plugged in to Monaco Editor:\n```js\nfor (const key of Object.keys(dts)) {\n    monaco.languages.typescript.typescriptDefaults.addExtraLib(dts[key], key);\n}\n```\nIn result, IntelliSense will be enabled for desired packages:\n![monaco-editor-intellisense](https://i.imgur.com/Er5DazL.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaviz%2Fdts-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaviz%2Fdts-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaviz%2Fdts-extractor/lists"}