{"id":15388510,"url":"https://github.com/deebloo/ts-custom-elements","last_synced_at":"2025-04-15T20:21:31.130Z","repository":{"id":12806688,"uuid":"72782262","full_name":"deebloo/ts-custom-elements","owner":"deebloo","description":"Typescript interfaces and decorators for custom elements v1","archived":false,"fork":false,"pushed_at":"2023-12-15T08:44:12.000Z","size":228,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T00:51:17.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/deebloo.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":"2016-11-03T20:05:35.000Z","updated_at":"2018-06-18T03:34:32.000Z","dependencies_parsed_at":"2024-10-18T19:59:04.413Z","dependency_job_id":"e795cc6f-0901-447f-af5a-74b3964af633","html_url":"https://github.com/deebloo/ts-custom-elements","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"b8ffa89062783497ffa8b3a9bccb266935e4d1ee"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fts-custom-elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fts-custom-elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fts-custom-elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deebloo%2Fts-custom-elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deebloo","download_url":"https://codeload.github.com/deebloo/ts-custom-elements/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637836,"owners_count":21137538,"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":[],"created_at":"2024-10-01T14:57:00.739Z","updated_at":"2025-04-15T20:21:31.105Z","avatar_url":"https://github.com/deebloo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ts-custom-elements\nTypescript interfaces and decorators for custom elements v1\n\n```bash\nnpm i --save ts-custom-elements\n```\n\nexample:\n```ts\nimport { CustomElement, OnConnected, OnDisconnected } from 'ts-custom-elements';\n\n@CustomElement({\n  tagName: 'foo-bar'\n})\nclass TestElement extends HTMLElement implements OnConnected, OnDisconnected {\n  connectedCallback() {\n    this.innerHTML = 'I have been rendered!';\n\n    this.addEventListener('click', this.onClick.bind(this));\n  }\n\n  disconnectedCallback() {\n    this.removeEventListener('click', this.onClick);\n  }\n\n  onClick() {\n    this.innerHTML = 'I was clicked!';\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeebloo%2Fts-custom-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeebloo%2Fts-custom-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeebloo%2Fts-custom-elements/lists"}