From 3624f9133bd59de5d07a567f2965a4f8e917671e Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Mon, 3 Jul 2023 15:10:49 +0100 Subject: [PATCH] Remove types.d.ts file from styling repos --- types/types.d.ts | 144 ----------------------------------------------- 1 file changed, 144 deletions(-) delete mode 100644 types/types.d.ts diff --git a/types/types.d.ts b/types/types.d.ts deleted file mode 100644 index a3f2712..0000000 --- a/types/types.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -// Type definitions for DataTables StateRestore -// -// Project: https://datatables.net/extensions/StateRestore/, https://datatables.net - -/// - -import DataTables, {Api} from 'datatables.net'; -import * as stateRestoreCollectionType from './StateRestoreCollection'; -import * as stateRestoreType from './StateRestore'; - -export default DataTables; - -type DeepPartial = T extends object ? { - [P in keyof T]?: DeepPartial; -} : T; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * DataTables' types integration - */ -declare module 'datatables.net' { - interface Config { - /** - * StateRestore extension options - */ - stateRestore?: boolean | string[] | ConfigStateRestore | ConfigStateRestore[]; - } - - interface ConfigLanguage { - /** - * StateRestore language options - */ - stateRestore?: ConfigStateRestoreLanguage; - } - - interface Api { - /** - * StateRestore API Methods - */ - stateRestore: ApiStateRestore; - } - - interface ApiStatic { - /** - * StateRestore class - */ - StateRestore: { - /** - * Create a new StateRestore instance for the target DataTable - */ - new (dt: Api, settings: string[] | ConfigStateRestore | ConfigStateRestore[]); - - /** - * StateRestore version - */ - version: string; - - /** - * Default configuration values - */ - defaults: ConfigStateRestore; - } - } -} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Options - */ -interface ConfigStateRestore extends Partial {} - -interface ConfigStateRestoreLanguage extends DeepPartial {} - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * API - */ - -interface ApiStateRestore { - /** - * Creates a new state, adding it to the collection. - * - * @param identifier The identifier that is to be used for the new state - * - * @returns DatatTables Api for chaining - */ - addState(identifier: string): void | Api; - - /** - * Retrieves a state from the collection. - * - * @param identifier The identifier of the state that is to be retrieved. - * - * @returns StateRestore instance, or further api methods. - */ - state(identifier: string): stateRestoreType.default | null | StateRestoreSubApi; - - /** - * Retrieves all of the states from the collection. - * - * @returns An array of the StateRestore instances, - * or further api methods that are applicable to multiple states. - */ - states(): stateRestoreType.default[] | StateRestoreMultiSubApi; -} - -interface StateRestoreSubApi extends Api { - /** - * Removes the state previously identified in the call to `state()`. - * - * @returns Datatables Api for chaining. - */ - remove(): Api; - - /** - * Loads the state previously identified in the call to `state()` into the table. - * - * @returns Datatables Api for chaining. - */ - load(): Api; - - /** - * Renames the state previously identified in the call to `state()`. - * - * @returns Datatables Api for chaining. - */ - rename(): Api; - - /** - * Saves the state previously identified in the call to `state()`. - * - * @returns Datatables Api for chaining. - */ - save(): Api; -} - -interface StateRestoreMultiSubApi extends Api { - /** - * Removes all of the states that were previously identified in the call to `states()`. - * - * @returns Datatables Api for chaining. - */ - remove(): Api; -}