fix(core): fix types for core and commit index.d.ts re-exports
This commit is contained in:
parent
a768d62adc
commit
83e1bce5f9
7 changed files with 67 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -22,7 +22,8 @@ yarn-error.log
|
||||||
|
|
||||||
## types
|
## types
|
||||||
*.d.ts
|
*.d.ts
|
||||||
!packages/*/types/*
|
!packages/**/*/types/**/*
|
||||||
|
!packages/**/index.d.ts
|
||||||
|
|
||||||
## temp folders
|
## temp folders
|
||||||
/.tmp/
|
/.tmp/
|
||||||
|
|
|
||||||
51
packages/core/index.d.ts
vendored
Normal file
51
packages/core/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
export { asyncAppend } from 'lit-html/directives/async-append.js';
|
||||||
|
export { asyncReplace } from 'lit-html/directives/async-replace.js';
|
||||||
|
export { cache } from 'lit-html/directives/cache.js';
|
||||||
|
export { classMap } from 'lit-html/directives/class-map.js';
|
||||||
|
export { guard } from 'lit-html/directives/guard.js';
|
||||||
|
export { ifDefined } from 'lit-html/directives/if-defined.js';
|
||||||
|
export { repeat } from 'lit-html/directives/repeat.js';
|
||||||
|
export { styleMap } from 'lit-html/directives/style-map.js';
|
||||||
|
export { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
||||||
|
export { until } from 'lit-html/directives/until.js';
|
||||||
|
export { render as renderShady } from 'lit-html/lib/shady-render.js';
|
||||||
|
export { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
||||||
|
export { dedupeMixin } from '@open-wc/dedupe-mixin';
|
||||||
|
export { DelegateMixin } from './src/DelegateMixin.js';
|
||||||
|
export { DisabledMixin } from './src/DisabledMixin.js';
|
||||||
|
export { DisabledWithTabIndexMixin } from './src/DisabledWithTabIndexMixin.js';
|
||||||
|
export { SlotMixin } from './src/SlotMixin.js';
|
||||||
|
export { UpdateStylesMixin } from './src/UpdateStylesMixin.js';
|
||||||
|
export { browserDetection } from './src/browserDetection.js';
|
||||||
|
export {
|
||||||
|
css,
|
||||||
|
CSSResult,
|
||||||
|
customElement,
|
||||||
|
defaultConverter,
|
||||||
|
eventOptions,
|
||||||
|
LitElement,
|
||||||
|
notEqual,
|
||||||
|
property,
|
||||||
|
query,
|
||||||
|
queryAll,
|
||||||
|
supportsAdoptingStyleSheets,
|
||||||
|
unsafeCSS,
|
||||||
|
UpdatingElement,
|
||||||
|
} from 'lit-element';
|
||||||
|
export {
|
||||||
|
AttributePart,
|
||||||
|
BooleanAttributePart,
|
||||||
|
directive,
|
||||||
|
EventPart,
|
||||||
|
html,
|
||||||
|
isDirective,
|
||||||
|
isPrimitive,
|
||||||
|
noChange,
|
||||||
|
NodePart,
|
||||||
|
nothing,
|
||||||
|
PropertyPart,
|
||||||
|
render,
|
||||||
|
svg,
|
||||||
|
SVGTemplateResult,
|
||||||
|
TemplateResult,
|
||||||
|
} from 'lit-html';
|
||||||
|
|
@ -379,7 +379,7 @@ describe('DelegateMixin', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('works with connectedCallback', async () => {
|
it('works with connectedCallback', async () => {
|
||||||
class ConnectedElement extends DelegateMixin(HTMLElement) {
|
class ConnectedElement extends DelegateMixin(LitElement) {
|
||||||
get delegations() {
|
get delegations() {
|
||||||
return {
|
return {
|
||||||
...super.delegations,
|
...super.delegations,
|
||||||
|
|
|
||||||
6
packages/core/types/DelegateMixinTypes.d.ts
vendored
6
packages/core/types/DelegateMixinTypes.d.ts
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
import { Constructor } from '@open-wc/dedupe-mixin';
|
import { Constructor } from '@open-wc/dedupe-mixin';
|
||||||
|
import { LitElement } from '../index.js';
|
||||||
|
|
||||||
export type Delegations = {
|
export type Delegations = {
|
||||||
target: Function;
|
target: Function;
|
||||||
|
|
@ -20,6 +21,9 @@ export declare class DelegateMixinHost {
|
||||||
private __emptyEventListenerQueue(): void;
|
private __emptyEventListenerQueue(): void;
|
||||||
|
|
||||||
private __emptyPropertiesQueue(): void;
|
private __emptyPropertiesQueue(): void;
|
||||||
|
|
||||||
|
connectedCallback(): void;
|
||||||
|
updated(changedProperties: import('lit-element').PropertyValues): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -44,7 +48,7 @@ export declare class DelegateMixinHost {
|
||||||
* `;
|
* `;
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
declare function DelegateMixinImplementation<T extends Constructor<HTMLElement>>(
|
declare function DelegateMixinImplementation<T extends Constructor<LitElement>>(
|
||||||
superclass: T,
|
superclass: T,
|
||||||
): T & Constructor<DelegateMixinHost>;
|
): T & Constructor<DelegateMixinHost>;
|
||||||
|
|
||||||
|
|
|
||||||
3
packages/core/types/DisabledMixinTypes.d.ts
vendored
3
packages/core/types/DisabledMixinTypes.d.ts
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
import { Constructor } from '@open-wc/dedupe-mixin';
|
import { Constructor } from '@open-wc/dedupe-mixin';
|
||||||
|
import { LitElement } from 'lit-element';
|
||||||
|
|
||||||
export declare class DisabledMixinHost {
|
export declare class DisabledMixinHost {
|
||||||
static get properties(): {
|
static get properties(): {
|
||||||
|
|
@ -22,7 +23,7 @@ export declare class DisabledMixinHost {
|
||||||
private __internalSetDisabled(value: boolean): void;
|
private __internalSetDisabled(value: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare function DisabledMixinImplementation<T extends Constructor<HTMLElement>>(
|
export declare function DisabledMixinImplementation<T extends Constructor<LitElement>>(
|
||||||
superclass: T,
|
superclass: T,
|
||||||
): T & Constructor<DisabledMixinHost>;
|
): T & Constructor<DisabledMixinHost>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Constructor } from '@open-wc/dedupe-mixin';
|
import { Constructor } from '@open-wc/dedupe-mixin';
|
||||||
import { DisabledMixinHost } from './DisabledMixinTypes';
|
import { DisabledMixinHost } from './DisabledMixinTypes';
|
||||||
|
import { LitElement } from 'lit-element';
|
||||||
export declare class DisabledWithTabIndexMixinHost {
|
export declare class DisabledWithTabIndexMixinHost {
|
||||||
static get properties(): {
|
static get properties(): {
|
||||||
tabIndex: {
|
tabIndex: {
|
||||||
|
|
@ -20,9 +21,11 @@ export declare class DisabledWithTabIndexMixinHost {
|
||||||
public retractRequestToBeDisabled(): void;
|
public retractRequestToBeDisabled(): void;
|
||||||
|
|
||||||
private __internalSetTabIndex(value: boolean): void;
|
private __internalSetTabIndex(value: boolean): void;
|
||||||
|
|
||||||
|
firstUpdated(changedProperties: import('lit-element').PropertyValues): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare function DisabledWithTabIndexMixinImplementation<T extends Constructor<HTMLElement>>(
|
export declare function DisabledWithTabIndexMixinImplementation<T extends Constructor<LitElement>>(
|
||||||
superclass: T,
|
superclass: T,
|
||||||
): T & Constructor<DisabledWithTabIndexMixinHost> & Constructor<DisabledMixinHost>;
|
): T & Constructor<DisabledWithTabIndexMixinHost> & Constructor<DisabledMixinHost>;
|
||||||
|
|
||||||
|
|
|
||||||
2
packages/core/types/SlotMixinTypes.d.ts
vendored
2
packages/core/types/SlotMixinTypes.d.ts
vendored
|
|
@ -25,6 +25,8 @@ export declare class SlotMixinHost {
|
||||||
* @return {boolean} true if given slot name been created by SlotMixin
|
* @return {boolean} true if given slot name been created by SlotMixin
|
||||||
*/
|
*/
|
||||||
protected _isPrivateSlot(slotName: string): boolean;
|
protected _isPrivateSlot(slotName: string): boolean;
|
||||||
|
|
||||||
|
connectedCallback(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue