Skip to content

Commit

Permalink
add: refactor types to support exporting interface for GABRYCA implem…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
TheDahoom committed Nov 15, 2024
1 parent 0060a1c commit 63e6eab
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "sk-seo",
"version": "0.4.3",
"version": "0.4.4",
"description": "A lightweight, no depenencies, Sveltekit SEO component to save your time",
"main": "SEO.svelte",
"exports": {
".": {
"types": "./SEO.svelte.d.ts",
"types": "./types/SEO.svelte.d.ts",
"svelte": "./SEO.svelte"
}
},
Expand Down
20 changes: 20 additions & 0 deletions types/SEO.svelte.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @typedef {import('./SEO').SEOProps} SeoProps */
/** @typedef {typeof __propDef.events} SeoEvents */
/** @typedef {typeof __propDef.slots} SeoSlots */
export default class Seo extends SvelteComponent<SeoProps, {
[evt: string]: CustomEvent<any>;
}, {}> {
}
export type SeoProps = import('./SEO').SEOProps;
export type SeoEvents = typeof __propDef.events;
export type SeoSlots = typeof __propDef.slots;
//@ts-ignore
import { SvelteComponent } from "svelte";
declare const __propDef: {
props: SeoProps;
events: {
[evt: string]: CustomEvent<any>;
};
slots: {};
};
export { SeoProps as SEOProps };
41 changes: 4 additions & 37 deletions SEO.svelte.d.ts → types/SEO.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/** @typedef {typeof __propDef.props} SeoProps */
/** @typedef {typeof __propDef.events} SeoEvents */
/** @typedef {typeof __propDef.slots} SeoSlots */
export default class Seo extends SvelteComponent<{
export interface SEOProps {
/** The title of the page.*/
title?: string;
/** The description of the website.*/
Expand Down Expand Up @@ -35,36 +32,6 @@ export default class Seo extends SvelteComponent<{
socials?: string[];
/** The name to be used for SchemaOrg */
name?: string;
}, {
[evt: string]: CustomEvent<any>;
}, {}> {
}
export type SeoProps = typeof __propDef.props;
export type SeoEvents = typeof __propDef.events;
export type SeoSlots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
declare const __propDef: {
props: {
title?: string;
description?: string;
keywords?: string;
canonical?: string;
siteName?: string;
index?: boolean;
twitter?: boolean;
openGraph?: boolean;
schemaOrg?: boolean;
schemaType?: string;
jsonld?: {};
imageURL?: string;
logo?: string;
author?: string;
socials?: string[];
name?: string;
};
events: {
[evt: string]: CustomEvent<any>;
};
slots: {};
};
export {};
/** The type of the page */
type?: string;
}

0 comments on commit 63e6eab

Please sign in to comment.