vue-tweet
Version:
Embed tweets just by giving the ID of a Tweet
163 lines (150 loc) • 4.62 kB
TypeScript
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { DefineComponent } from 'vue';
import { ExtractPropTypes } from 'vue';
import { PropType } from 'vue';
import { PublicProps } from 'vue';
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
tweetId: {
type: StringConstructor;
default: string;
};
tweetUrl: {
type: StringConstructor;
default: string;
};
conversation: {
type: PropType<"all" | "none">;
default: string;
validator: (value: string) => boolean;
};
cards: {
type: PropType<"visible" | "hidden">;
default: string;
validator: (value: string) => boolean;
};
width: {
type: PropType<"auto" | number>;
default: string;
validator: (value: string | number) => boolean;
};
align: {
type: PropType<"left" | "right" | "center" | undefined>;
default: any;
validator: (value: string | undefined) => boolean;
};
theme: {
type: PropType<"light" | "dark" | "system">;
default: string;
validator: (value: string) => boolean;
};
lang: {
type: PropType<TweetLang>;
default: string;
};
dnt: {
type: BooleanConstructor;
default: boolean;
};
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"tweet-load-success": (...args: any[]) => void;
"tweet-load-error": (...args: any[]) => void;
}, string, PublicProps, Readonly< ExtractPropTypes<{
tweetId: {
type: StringConstructor;
default: string;
};
tweetUrl: {
type: StringConstructor;
default: string;
};
conversation: {
type: PropType<"all" | "none">;
default: string;
validator: (value: string) => boolean;
};
cards: {
type: PropType<"visible" | "hidden">;
default: string;
validator: (value: string) => boolean;
};
width: {
type: PropType<"auto" | number>;
default: string;
validator: (value: string | number) => boolean;
};
align: {
type: PropType<"left" | "right" | "center" | undefined>;
default: any;
validator: (value: string | undefined) => boolean;
};
theme: {
type: PropType<"light" | "dark" | "system">;
default: string;
validator: (value: string) => boolean;
};
lang: {
type: PropType<TweetLang>;
default: string;
};
dnt: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onTweet-load-success"?: (...args: any[]) => any;
"onTweet-load-error"?: (...args: any[]) => any;
}>, {
tweetId: string;
tweetUrl: string;
conversation: "all" | "none";
cards: "visible" | "hidden";
width: number | "auto";
align: "left" | "right" | "center";
theme: "light" | "dark" | "system";
lang: TweetLang;
dnt: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, true, {
tweetContainerRef: HTMLDivElement;
}, any>;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
error?(_: {}): any;
loading?(_: {}): any;
};
refs: {
tweetContainerRef: HTMLDivElement;
};
rootEl: any;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export { _default as VueTweet }
export default _default;
export declare type TweetLang = 'ar' | 'bn' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fa' | 'fi' | 'fil' | 'fr' | 'he' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'msa' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sv' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'zh-cn' | 'zh-tw';
export declare interface TweetProps {
tweetId?: string;
tweetUrl?: string;
conversation?: 'all' | 'none';
cards?: 'visible' | 'hidden';
width?: 'auto' | number;
align?: 'left' | 'right' | 'center';
theme?: 'light' | 'dark' | 'system';
lang?: TweetLang;
dnt?: boolean;
}
export { }
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$attrs: Record<string, unknown>
}
interface ComponentInternalInstance {
setupState: Record<string, any>
}
}