Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add class generic type param in manifest #3292

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

DavideMininni-Fincons
Copy link
Contributor

@DavideMininni-Fincons DavideMininni-Fincons commented Dec 12, 2024

BEGIN_COMMIT_OVERRIDE
fix: add class generic type param in manifest (#3292)

END_COMMIT_OVERRIDE

The datepicker and the calendar components use generic type parameter to allow custom implementation of Date, eg.

export class SbbDatepickerElement<T = Date> {
    private _min?: T | null;
    // and so on
}

This needs to be taken in account in Angular classes generation, so a new param has been added to the manifest during its generation, eg.

{
    "kind": "javascript-module",
    "path": "datepicker/datepicker.js",
    "declarations": [
      {
          "kind": "class",
          "description": "Combined with a native input, it displays the input's value as a formatted date.",
          "name": "SbbDatepickerElement",
          "members": [],
          "events": [],
          "attributes": [],
          "superclass": {},
          "classGenerics": "T = Date",        <--------------------------------- new property
          "tagName": "sbb-datepicker",
          "customElement": true
        }
    ],
    exports: []

Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the pr: lead review approved Pull request has been approved by a lead review label Dec 12, 2024
@jeripeierSBB jeripeierSBB merged commit a796c85 into main Dec 12, 2024
26 checks passed
@jeripeierSBB jeripeierSBB deleted the feat/classes-generic-type-in-manifest branch December 12, 2024 10:48
@github-actions github-actions bot removed the pr: peer review required A peer review is required for this pull request label Dec 12, 2024
sbb-design-systems-bot bot pushed a commit that referenced this pull request Dec 12, 2024
The datepicker and the calendar components use generic type parameter to
allow custom implementation of Date, eg.

```
export class SbbDatepickerElement<T = Date> {
    private _min?: T | null;
    // and so on
}
```

This needs to be taken in account in Angular classes generation, so a
new param has been added to the manifest during its generation, eg.

```
{
    "kind": "javascript-module",
    "path": "datepicker/datepicker.js",
    "declarations": [
      {
          "kind": "class",
          "description": "Combined with a native input, it displays the input's value as a formatted date.",
          "name": "SbbDatepickerElement",
          "members": [],
          "events": [],
          "attributes": [],
          "superclass": {},
          "classGenerics": "T = Date",        <--------------------------------- new property
          "tagName": "sbb-datepicker",
          "customElement": true
        }
    ],
    exports: []
```
@github-actions github-actions bot added the pr: peer review required A peer review is required for this pull request label Dec 12, 2024
@jeripeierSBB jeripeierSBB changed the title feat: add class generic type param in manifest fix: add class generic type param in manifest Dec 12, 2024
jeripeierSBB pushed a commit that referenced this pull request Dec 12, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.0.1](v2.0.0...v2.0.1)
(2024-12-12)


### Features

* add class generic type param in manifest
([#3292](#3292))
([3d872c1](3d872c1))


### Bug Fixes

* **sbb-message:** support the use of `figure` as image
([#3294](#3294))
([1d64853](1d64853))
* **sbb-radio-button-panel:** remove extension clause in mixin which
cause incorrect manifest generation
([#3288](#3288))
([b5457a7](b5457a7))
* **sbb-teaser:** fix image related issues
([#3293](#3293))
([e6f517b](e6f517b))


### Miscellaneous Chores

* release 2.0.1
([2a43d06](2a43d06))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff-available pr: lead review approved Pull request has been approved by a lead review pr: peer review required A peer review is required for this pull request pr: visual review required preview-available target: 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants