Installation
npm install --save @types/clamp-js
Summary
This package contains type definitions for clamp-js (https://github.com/xavi160/Clamp.js).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clamp-js.
index.d.ts
declare namespace clamp {
interface ClampOptions {
clamp?: number | string | undefined;
useNativeClamp?: boolean | undefined;
splitOnChars?: string[] | undefined;
animate?: boolean | undefined;
truncationChar?: string | undefined;
truncationHTML?: string | null | undefined;
}
interface ClampResponse {
original: string;
clamped: string;
}
}
declare function clamp(element: HTMLElement, options?: clamp.ClampOptions): clamp.ClampResponse;
export = clamp;
export as namespace clamp;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
Credits
These definitions were written by Sebastiaan de Rooij.