{"id":18063010,"url":"https://github.com/stagas/with-properties","last_synced_at":"2026-06-08T16:03:02.055Z","repository":{"id":57398445,"uuid":"434502485","full_name":"stagas/with-properties","owner":"stagas","description":"custom elements base class factory with properties mapped to observed attributes","archived":false,"fork":false,"pushed_at":"2022-03-16T17:54:39.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-02T04:39:48.913Z","etag":null,"topics":["custom-elements","mixin","observed-attributes","properties","web-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stagas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-03T07:20:21.000Z","updated_at":"2021-12-04T13:15:52.000Z","dependencies_parsed_at":"2022-08-29T18:50:25.671Z","dependency_job_id":null,"html_url":"https://github.com/stagas/with-properties","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"stagas/ts","purl":"pkg:github/stagas/with-properties","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwith-properties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwith-properties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwith-properties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwith-properties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stagas","download_url":"https://codeload.github.com/stagas/with-properties/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwith-properties/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["custom-elements","mixin","observed-attributes","properties","web-components"],"created_at":"2024-10-31T05:09:08.901Z","updated_at":"2026-06-08T16:03:02.029Z","avatar_url":"https://github.com/stagas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ewith-properties\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\ncustom elements base class factory with properties mapped to observed attributes\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"#install\"\u003e        🔧 \u003cstrong\u003eInstall\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#example\"\u003e        🧩 \u003cstrong\u003eExample\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#api\"\u003e            📜 \u003cstrong\u003eAPI docs\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/with-properties/releases\"\u003e 🔥 \u003cstrong\u003eReleases\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#contribute\"\u003e     💪🏼 \u003cstrong\u003eContribute\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/with-properties/issues\"\u003e   🖐️ \u003cstrong\u003eHelp\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n***\n\n## Install\n\n```sh\n$ npm i with-properties\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n*   [withProperties](#withproperties)\n    *   [Parameters](#parameters)\n\n### withProperties\n\n[src/index.ts:84-129](https://github.com/stagas/with-properties/blob/347859f1dd6689f28f04586900fbe4e8a754a482/src/index.ts#L84-L129 \"Source code on GitHub\")\n\n```js\nclass Foo extends withProperties(\n  HTMLElement,\n  class {\n    string? = String\n    number? = Number\n    boolean = Boolean\n    implicitString = 'string'\n    implicitNumber = 123\n    implicitBoolean = true\n    somethingElse? = new Uint8Array(1)\n  }\n) {}\n```\n\n#### Parameters\n\n*   `parent` **C** The parent constructor to extend (usually `HTMLElement`)\n*   `propsClass` **[Constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor)\\\u003cP\u003e** A \"props\" class to create the properties from\n\nReturns **any** A base constructor to be extended from\n\n## Contribute\n\n[Fork](https://github.com/stagas/with-properties/fork) or\n[edit](https://github.dev/stagas/with-properties) and submit a PR.\n\nAll contributions are welcome!\n\n## License\n\nMIT © 2021\n[stagas](https://github.com/stagas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwith-properties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstagas%2Fwith-properties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwith-properties/lists"}