{"id":18961952,"url":"https://github.com/lamualfa/common-dts","last_synced_at":"2026-01-21T05:46:13.261Z","repository":{"id":114730477,"uuid":"593301862","full_name":"lamualfa/common-dts","owner":"lamualfa","description":"📘 Collection of reusable .d.ts files commonly used on your projects.","archived":false,"fork":false,"pushed_at":"2023-01-26T12:17:42.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T18:14:48.763Z","etag":null,"topics":["declaration","definition","import","type","typescript"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lamualfa.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":"2023-01-25T17:41:23.000Z","updated_at":"2023-03-15T17:20:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dbcf515-ba06-4a2d-a026-f4ac4956e915","html_url":"https://github.com/lamualfa/common-dts","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"24c2820a85cffb99b5f0a553527101db000608d4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fcommon-dts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fcommon-dts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fcommon-dts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamualfa%2Fcommon-dts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamualfa","download_url":"https://codeload.github.com/lamualfa/common-dts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610351,"owners_count":21132924,"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":["declaration","definition","import","type","typescript"],"created_at":"2024-11-08T14:14:48.692Z","updated_at":"2026-01-21T05:46:13.216Z","avatar_url":"https://github.com/lamualfa.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshot.png\"/\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eNo More Type Extension Error\u003c/h3\u003e\n\n\u0026nbsp;\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"npm version\" src=\"https://img.shields.io/npm/v/common-dts?color=%23e74c3c\u0026style=flat-square\"\u003e\n  \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/lamualfa/common-dts?color=%239b59b6\u0026style=flat-square\"\u003e\n\u003c/p\u003e\n\n\u0026nbsp;\n\n# common-dts \u003cimg src=\"docs/dts.svg\" alt=\"DTS Logo\" width=\"30\"/\u003e\n\nCollection of reusable `.d.ts` files commonly used on your projects. So you don't need to Google it again.\n\n![hr](https://user-images.githubusercontent.com/39755201/159233055-3bd55a37-7284-46ad-b759-5ab0c13b3828.png)\n\n## Installation\n\n###### NPM\n\n```bash\nnpm i -D common-dts\n```\n\n###### PNPM\n\n```bash\npnpm add -D common-dts\n```\n\n###### Yarn\n\n```bash\nyarn add -D common-dts\n```\n\n![hr](https://user-images.githubusercontent.com/39755201/159233055-3bd55a37-7284-46ad-b759-5ab0c13b3828.png)\n\n## Usage\n\n### A. Globally\n\nThe entire project will affected when using this method. So, you don't need to importing the type again.\n\n\u003e **Don't want to affect the entire project?** Use [Locally](#b-locally) method for individual file configuration.\n\n###### Format\n\nPut this code on any `.d.ts` file on your project. Or you can create a new one if it doesn't exist.\n\n```ts\ndeclare global {\n  import \"common-dts/types/\u003cfile-name\u003e\";\n}\n```\nSee [Supported Extensions](#supported-extensions) for the list of available `\u003cfile-name\u003e`.\n\n###### Example\n\n```ts\ndeclare global {\n  import \"common-dts/types/module.css\";\n  import \"common-dts/types/module.scss\";\n  import \"common-dts/types/react/svg\";\n}\n```\n\n### B. Locally\n\nOnly file with the imported type will affected when using this method.\n\n###### Format\n\n```ts\nimport \"common-dts/types/\u003cfile-name\u003e\";\n```\nSee [Supported Extensions](#supported-extensions) for the list of available `\u003cfile-name\u003e`.\n\n###### Example\n\n```ts\nimport \"common-dts/types/module.scss\";\n\n// Now you can import your SCSS file without typing error\nimport classes from \"./index.module.scss\";\n\n// Your code\n```\n![hr](https://user-images.githubusercontent.com/39755201/159233055-3bd55a37-7284-46ad-b759-5ab0c13b3828.png)\n\n## Supported Extensions\n \n| Framework | Name                | Extension                     | File Name          |\n| --------- | ------------------- | ----------------------------- | ------------------ |\n| Any       | CSS Module          | `.module.css`                 | `module.css.d.ts`  |\n| Any       | Sass or SCSS Module | `.module.scss` `.module.sass` | `module.scss.d.ts` |\n| Any       | AVIF                | `.avif`                       | `avif.d.ts`        |\n| Any       | Bitmap              | `.bmp`                        | `bmp.d.ts`         |\n| Any       | PNG                 | `.png`                        | `png.d.ts`         |\n| Any       | JPG                 | `.jpg` `.jpeg`                | `jpg.d.ts`         |\n| Any       | GIF                 | `.gif`                        | `gif.d.ts`         |\n| Any       | WEBP                | `.webp`                       | `webp.d.ts`        |\n| React     | SVG                 | `.svg`                        | `react/svg.d.ts`   |\n| Vue 2     | SVG                 | `.svg`                        | `vue2/svg.d.ts`    |\n| Vue 3     | SVG                 | `.svg`                        | `vue3/svg.d.ts`    |\n| Solid     | SVG                 | `.svg`                        | `solid/svg.d.ts`   |\n| Svelte    | SVG                 | `.svg`                        | `svelte/svg.d.ts`  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fcommon-dts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamualfa%2Fcommon-dts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamualfa%2Fcommon-dts/lists"}