mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
26 lines
713 B
TypeScript
26 lines
713 B
TypeScript
// Type definitions for clamp-js 0.7
|
|
// Project: https://github.com/xavi160/Clamp.js
|
|
// Definitions by: Sebastiaan de Rooij <https://github.com/Hikariii>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace clamp {
|
|
interface ClampOptions {
|
|
clamp?: number|string;
|
|
useNativeClamp?: boolean;
|
|
splitOnChars?: string[];
|
|
animate?: boolean;
|
|
truncationChar?: string;
|
|
truncationHTML?: string | null;
|
|
}
|
|
|
|
interface ClampResponse {
|
|
original: string;
|
|
clamped: string;
|
|
}
|
|
}
|
|
|
|
declare function clamp(element: HTMLElement, options?: clamp.ClampOptions): clamp.ClampResponse;
|
|
|
|
export = clamp;
|
|
export as namespace clamp;
|