# @types/knockout-transformations

> TypeScript definitions for knockout-transformations

Latest version **2.0.33** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/knockout-transformations
pnpm add @types/knockout-transformations
yarn add @types/knockout-transformations
bun add @types/knockout-transformations
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.33 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/knockout-transformations
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout-transformations
- npm.io page: https://npm.io/package/@types/knockout-transformations

## Dependencies (1)

- [@types/knockout](https://npm.io/package/@types/knockout.md) *

## Recent versions

- 2.0.33 (latest) — 2023-11-07
- 2.0.30 (ts3.6) — 2021-07-08
- 2.0.29 (ts2.3) — 2017-11-15
- 2.0.28 (ts2.0) — 2016-09-19
- 2.0.32 — 2023-10-18
- 2.0.31 — 2023-09-14
- 2.0.27 — 2016-07-14
- 2.0.26-alpha — 2016-07-08
- 2.0.25-alpha — 2016-07-04
- 2.0.24-alpha — 2016-07-02
- 2.0.23-alpha — 2016-07-01
- 2.0.22-alpha — 2016-07-01
- 2.0.21-alpha — 2016-05-25
- 2.0.20-alpha — 2016-05-20
- 2.0.15-alpha — 2016-05-19
- … 1 more at https://npm.io/package/@types/knockout-transformations/versions

## README

# Installation
> `npm install --save @types/knockout-transformations`

# Summary
This package contains type definitions for knockout-transformations (https://github.com/One-com/knockout-transformations).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout-transformations.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout-transformations/index.d.ts)
````ts
/// <reference types="knockout" />

declare namespace KnockoutTransformations {
    interface Mapping<T, TResult> {
        (value: T): TResult;
    }
    interface MappingOption<T, TResult> {
        mapping: Mapping<T, TResult>;
        disposeItem?: ((item: TResult) => void) | undefined;
    }
    interface MappingWithDisposeCallbackOption<T, TResult> {
        mappingWithDisposeCallback: (value: T) => {
            mappedValue: TResult;
            dispose: () => void;
        };
    }
}

interface KnockoutObservableArrayFunctions<T> {
    map<TResult>(mapping: KnockoutTransformations.Mapping<T, TResult>): KnockoutObservableArray<TResult>;
    map<TResult>(mapping: KnockoutTransformations.MappingOption<T, TResult>): KnockoutObservableArray<TResult>;
    map<TResult>(
        mapping: KnockoutTransformations.MappingWithDisposeCallbackOption<T, TResult>,
    ): KnockoutObservableArray<TResult>;

    filter(predicate: (value: T) => boolean): KnockoutObservableArray<T>;
    sortBy(sorter: (value: T, descending: (sorter: any) => any) => any): KnockoutObservableArray<T>;
    indexBy(indexer: (value: T) => string): KnockoutObservable<{ [index: string]: T[] }>;
    indexBy(indexer: (value: T) => string[]): KnockoutObservable<{ [index: string]: T[] }>;
    indexBy(indexer: (value: T) => any): KnockoutObservable<any>;
    uniqueIndexBy(indexer: (value: T) => string): KnockoutObservable<{ [index: string]: T }>;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/knockout](https://npmjs.com/package/@types/knockout)

# Credits
These definitions were written by [John Reilly](https://github.com/johnnyreilly), and [Wim Looman](https://github.com/Nemo157).

---
_Source: https://npm.io/package/@types/knockout-transformations · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
