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

update to use intersection types #156

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions demo/lit-app/custom-elements-svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export type CustomElements = {
* ### **CSS Parts:**
* - **radio-label** - Applies custom styles the radio group label
*/
"radio-group": Partial<RadioGroupProps | BaseProps | BaseEvents>;
"radio-group": Partial<RadioGroupProps & BaseProps & BaseEvents>;

/**
* Radio buttons allow users to select a single option from a group. Here is its [documentation](https://my-site.com/documentation).
Expand All @@ -162,7 +162,7 @@ export type CustomElements = {
* ### **Slots:**
* - _default_ - add text here to label your radio button
*/
"radio-button": Partial<RadioButtonProps | BaseProps | BaseEvents>;
"radio-button": Partial<RadioButtonProps & BaseProps & BaseEvents>;

/**
* @deprecated An example of a deprecated element
Expand All @@ -172,7 +172,7 @@ export type CustomElements = {
*
*/
"deprecated-element": Partial<
DeprecatedElementProps | BaseProps | BaseEvents
DeprecatedElementProps & BaseProps & BaseEvents
>;

/**
Expand All @@ -181,7 +181,7 @@ export type CustomElements = {
* ---
*
*/
"my-button": Partial<MyButtonProps | BaseProps | BaseEvents>;
"my-button": Partial<MyButtonProps & BaseProps & BaseEvents>;
};

declare namespace svelteHTML {
Expand Down
4 changes: 4 additions & 0 deletions packages/jsx-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.5.3

- Updated to use intersection types rather than union types

## 1.5.2

- Fixed async file output
Expand Down
2 changes: 1 addition & 1 deletion packages/jsx-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-element-jsx-integration",
"version": "1.5.2",
"version": "1.5.3",
"description": "Tools for integrating custom elements into JSX projects",
"main": "index.js",
"module": "index.js",
Expand Down
4 changes: 4 additions & 0 deletions packages/react-wrappers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.6.8

- Updated to import `React` in types

## 1.6.7

- Fixed binding for custom event listener
Expand Down
2 changes: 1 addition & 1 deletion packages/react-wrappers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-element-react-wrappers",
"version": "1.6.7",
"version": "1.6.8",
"description": "A tool for generating react-compatible wrappers for custom elements",
"main": "index.js",
"module": "index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react-wrappers/src/wrapper-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ function getTypeDefinitionTemplate(
const eventTypes = getCustomEventTypes(component);

return `
import React from "react";
import {
${config.defaultExport ? "default" : component.name} as ${
component.name
Expand Down
4 changes: 4 additions & 0 deletions packages/solidjs-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.8.2

- Updated to use intersection types rather than union types

## 1.8.1

- Fixed async file output
Expand Down
2 changes: 1 addition & 1 deletion packages/solidjs-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-element-solidjs-integration",
"version": "1.8.1",
"version": "1.8.2",
"description": "Tools for integrating custom elements into SolidJS",
"main": "index.js",
"module": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/solidjs-integration/src/type-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ ${components
*/
"${options.prefix}${component.tagName}${options.suffix}": Partial<${
component.name
}Props | BaseProps | BaseEvents>;`;
}Props & BaseProps & BaseEvents>;`;
})
.join("\n")}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/svelte-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.1.2

- Updated to use intersection types rather than union types

## 1.1.1

- Fixed async file output
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-element-svelte-integration",
"version": "1.1.1",
"version": "1.1.2",
"description": "Tools for integrating custom elements into a Svelte project",
"main": "index.js",
"module": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-integration/src/type-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ ${components
*/
"${options.prefix}${component.tagName}${options.suffix}": Partial<${
component.name
}Props | BaseProps | BaseEvents>;`;
}Props & BaseProps & BaseEvents>;`;
})
.join("\n")}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/vuejs-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.3.3

- Updated to use intersection types rather than union types

## 1.3.2

- Fixed async file output
Expand Down
2 changes: 1 addition & 1 deletion packages/vuejs-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-element-vuejs-integration",
"version": "1.3.2",
"version": "1.3.3",
"description": "Types for integrating custom elements into Vue.js projects",
"main": "index.js",
"module": "index.js",
Expand Down
Loading