{"id":18417430,"url":"https://github.com/stellar/dts-xdr","last_synced_at":"2025-08-13T21:35:05.581Z","repository":{"id":39883517,"uuid":"261269629","full_name":"stellar/dts-xdr","owner":"stellar","description":"A library for generating TypeScript declarations (.d.ts) for js-xdr auto-generated files.","archived":false,"fork":false,"pushed_at":"2024-08-01T21:55:36.000Z","size":61,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-06-18T15:51:58.219Z","etag":null,"topics":["stellar","typescript","xdr"],"latest_commit_sha":null,"homepage":"https://github.com/stellar/dts-xdr","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stellar.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":"2020-05-04T18:53:48.000Z","updated_at":"2023-11-02T13:16:22.000Z","dependencies_parsed_at":"2025-04-07T12:43:33.857Z","dependency_job_id":null,"html_url":"https://github.com/stellar/dts-xdr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stellar/dts-xdr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fdts-xdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fdts-xdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fdts-xdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fdts-xdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/dts-xdr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fdts-xdr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270321122,"owners_count":24564625,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["stellar","typescript","xdr"],"created_at":"2024-11-06T04:09:24.838Z","updated_at":"2025-08-13T21:35:05.525Z","avatar_url":"https://github.com/stellar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dts-xdr\n[![Stellar](https://circleci.com/gh/stellar/dts-xdr.svg?style=shield)](https://circleci.com/gh/stellar/dts-xdr)\n\n`dts-xdr` is a library for generating `TypeScript` declarations file (`.d.ts`) for [js-xdr](https://github.com/stellar/js-xdr) auto-generated files.\n\nThis library uses [jscodeshift](https://github.com/facebook/jscodeshift) to generate the definitions, follow the steps below to generate definitions.\n\n## Setup\n\n```sh\ngit clone https://github.com/stellar/dts-xdr.git\ncd dts-xdr\nyarn install\n```\n\n## Usage\n\nYou can use this library in two mode:\n\n### Source replacement\n\nThe first one is using inline replacement which is the default mode when you call `jscodeshift`. The following will replace the given file with the generated code:\n\n\u003e npx jscodeshift -t src/transform.js sample/stellar-xdr_generated.js\n\nAfter you run the command above, `sample/stellar-xdr_generated.js` will have the type definitions.\n\n### Output mode\n\nThe second mode is specifying an output file, this mode won't change the source file. The following command will generate a new file called `stellar-xdr_generated.d.ts` with the `TypeScript` declarations:\n\n\u003e OUT=stellar-xdr_generated.d.ts npx jscodeshift -t src/transform.js sample/stellar-xdr_generated.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fdts-xdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Fdts-xdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fdts-xdr/lists"}