Title: JavaIntegration: Allow expanding generic types · Issue #148 · ZenCodeLang/ZenCode · GitHub
Open Graph Title: JavaIntegration: Allow expanding generic types · Issue #148 · ZenCodeLang/ZenCode
X Title: JavaIntegration: Allow expanding generic types · Issue #148 · ZenCodeLang/ZenCode
Description: We want to create Expansions that have Generic Type Parameters from JavaIntegration code. Basically, we want to be able use Java Annotations to register the equivalent of this: public expand
Open Graph Description: We want to create Expansions that have Generic Type Parameters from JavaIntegration code. Basically, we want to be able use Java Annotations to register the equivalent of this: public expand
X Description: We want to create Expansions that have Generic Type Parameters from JavaIntegration code. Basically, we want to be able use Java Annotations to register the equivalent of this: public expand <T&...
Opengraph URL: https://github.com/ZenCodeLang/ZenCode/issues/148
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JavaIntegration: Allow expanding generic types","articleBody":"We want to create Expansions that have Generic Type Parameters from JavaIntegration code.\nBasically, we want to be able use Java Annotations to register the equivalent of this:\n```tsx\npublic expand \u003cT\u003e KnownTag\u003cT\u003e {\n\n public get T? first =\u003e this.empty ? null : this.elements[0];\n}\n```\n\nFor that we need multiple things working:\n- [ ] Define Type parameters for `@ZenCodeType.Expansion` classes.\n - [ ] Define Type bounds for these type parameters\n - [ ] Define Name of these parameters\n- [ ] Be able to use these parameters inside the `@ZenCodeType.Expansion#value` method\n\nJared already started with some work:\nhttps://github.com/ZenCodeLang/ZenCode/tree/feature/expansion-generics\n\nAcceptance Criteria:\n- [ ] Test cases (valid code):\n - [ ] Simple case with unbounded/default bounded `\u003cT\u003e`\n - [ ] Case with type bound `\u003cT: CommandStringDisplayable\u003e`\n - [ ] Case with super bound `\u003cT super SomeType\u003e`\n - [ ] Case with multiple generic Parameters `\u003cT, U\u003e`\n - [ ] Case where the number of Generic bounds and type bounds don't match `\u003cT\u003e expand Function\u003cT, T\u003e`\n - [ ] Case where the type bounds reference each other `\u003cT, U expands T\u003e expand Function\u003cT, U\u003e`\n - [ ] Case where the expansion is generic and the added method itself also\n ```\n public \u003cT\u003e expand SomeType\u003cT\u003e { \n public \u003cU\u003e doSomethingWith(U: value): void; \n }\n ```\n- [ ] Test Cases (invalid code):\n - [ ] Specify Type Parameters that are not used in the expansion `\u003cT\u003e expand string`\n - [ ] Specify Type parameters whose bounds are not proper `\u003cT: string\u003e expand Recipe\u003cT\u003e`\n - [ ] Specify two type parameters with the same name `\u003cT, T\u003e expand Function\u003cT, T\u003e`","author":{"url":"https://github.com/kindlich","@type":"Person","name":"kindlich"},"datePublished":"2024-06-02T17:18:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/148/ZenCode/issues/148"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e2e06eee-75d7-2e4f-b070-c2aad44ef7b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E40:BFBA6:21E1DBA:2BF4CA6:6990AA0D |
| html-safe-nonce | 2787530db7228cb39f508c059634cdf48d347e4896dbc7525a7ffc67b781311f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTQwOkJGQkE2OjIxRTFEQkE6MkJGNENBNjo2OTkwQUEwRCIsInZpc2l0b3JfaWQiOiI0MDg1MzA2ODExMzU5NDcyMTQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e41e233185b620e4161dfe268798ae1511882a7d1605a85daadb80458d986f24 |
| hovercard-subject-tag | issue:2329773131 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ZenCodeLang/ZenCode/148/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4cc72a7930663ee3aeeb4e5d091ea219084830398db249c2939c1f42aefba12/ZenCodeLang/ZenCode/issues/148 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4cc72a7930663ee3aeeb4e5d091ea219084830398db249c2939c1f42aefba12/ZenCodeLang/ZenCode/issues/148 |
| og:image:alt | We want to create Expansions that have Generic Type Parameters from JavaIntegration code. Basically, we want to be able use Java Annotations to register the equivalent of this: public expand |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kindlich |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/ZenCodeLang/ZenCode git https://github.com/ZenCodeLang/ZenCode.git |
| octolytics-dimension-user_id | 68248418 |
| octolytics-dimension-user_login | ZenCodeLang |
| octolytics-dimension-repository_id | 309683985 |
| octolytics-dimension-repository_nwo | ZenCodeLang/ZenCode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 309683985 |
| octolytics-dimension-repository_network_root_nwo | ZenCodeLang/ZenCode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width