{"id":15062859,"url":"https://github.com/khrj/typed-event-target","last_synced_at":"2025-12-11T21:17:37.325Z","repository":{"id":51169828,"uuid":"340060673","full_name":"khrj/typed-event-target","owner":"khrj","description":"Strictly typed EventTarget for Deno and the Browser","archived":false,"fork":false,"pushed_at":"2022-10-26T10:59:37.000Z","size":65,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T09:11:26.804Z","etag":null,"topics":["browser","deno","emit","event","eventtarget","strict","types","typescript"],"latest_commit_sha":null,"homepage":"","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/khrj.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}},"created_at":"2021-02-18T13:36:04.000Z","updated_at":"2024-05-25T23:27:43.000Z","dependencies_parsed_at":"2022-09-26T20:41:33.524Z","dependency_job_id":null,"html_url":"https://github.com/khrj/typed-event-target","commit_stats":null,"previous_names":["khushrajrathod/typedeventtarget"],"tags_count":2,"template":false,"template_full_name":"khrj/blueprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Ftyped-event-target","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Ftyped-event-target/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Ftyped-event-target/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrj%2Ftyped-event-target/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khrj","download_url":"https://codeload.github.com/khrj/typed-event-target/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199079,"owners_count":21063641,"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":["browser","deno","emit","event","eventtarget","strict","types","typescript"],"created_at":"2024-09-24T23:47:33.233Z","updated_at":"2025-12-11T21:17:32.043Z","avatar_url":"https://github.com/khrj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/logo.svg\" width=\"400\" height=\"400\" alt=\"typed_event_target illustration\"\u003e\n    \u003ch1\u003eTyped Event Target\u003c/h1\u003e\n    \u003cp\u003e\n        \u003cb\u003eStrictly typed EventTarget for Deno and the Browser\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cimg alt=\"build status\" src=\"https://img.shields.io/github/workflow/status/khrj/typed-event-target/Deno?label=checks\" \u003e\n        \u003cimg alt=\"language\" src=\"https://img.shields.io/github/languages/top/khrj/typed-event-target\" \u003e\n        \u003cimg alt=\"code size\" src=\"https://img.shields.io/github/languages/code-size/khrj/typed-event-target\"\u003e\n        \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues/khrj/typed-event-target\" \u003e\n        \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/khrj/typed-event-target\"\u003e\n        \u003cimg alt=\"version\" src=\"https://img.shields.io/github/v/release/khrj/typed-event-target\"\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003cb\u003e\u003ca href=\"https://deno.land/x/typed_event_target\"\u003eView on deno.land\u003c/a\u003e\u003c/b\u003e\n    \u003c/p\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n\u003c/div\u003e\n\n## Usage\n\n```ts\nimport { TypedCustomEvent, TypedEventTarget } from 'https://deno.land/x/typed_event_target@1.0.1/mod.ts'\n\ntype Events = {\n    Hi: string\n    Hello: boolean\n}\n\nconst emitter = new TypedEventTarget\u003cEvents\u003e()\n\nemitter.addEventListener(\"Hi\", (value) =\u003e {\n    console.log(value.detail) // \"Hello\"\n})\n\nemitter.dispatchEvent(new TypedCustomEvent(\"Hi\", { detail: \"Hello\" }))\n```\n\n## API\n\nSame as [non-strict EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), however a parameter _must_ be passed to `TypedCustomEvent`.\n\n## Supporters\n\n[![Stargazers repo roster for @khrj/typed-event-target](https://reporoster.com/stars/khrj/typed-event-target)](https://github.com/khrj/typed-event-target/stargazers)\n\n[![Forkers repo roster for @khrj/typed-event-target](https://reporoster.com/forks/khrj/typed-event-target)](https://github.com/khrj/typed-event-target/network/members)\n\n## Related\n\n- [Deno modules](https://github.com/khrj/deno-modules)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Ftyped-event-target","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhrj%2Ftyped-event-target","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrj%2Ftyped-event-target/lists"}