mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
21 lines
625 B
TypeScript
21 lines
625 B
TypeScript
// Type definitions for clamp-js-main 0.11
|
|
// Project: https://github.com/jmenglis/clamp-js-main#readme
|
|
// Definitions by: Sinziana Nicolae <https://github.com/sinziananicolae>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export interface ClampOptions {
|
|
clamp?: number|string;
|
|
useNativeClamp?: boolean;
|
|
splitOnChars?: string[];
|
|
animate?: boolean;
|
|
truncationChar?: string;
|
|
truncationHTML?: string | null;
|
|
}
|
|
|
|
export interface ClampResponse {
|
|
original: string;
|
|
clamped: string;
|
|
}
|
|
|
|
export default function clamp(element: HTMLElement, options?: ClampOptions): ClampResponse;
|