diff --git a/snapshots/has.ts b/snapshots/has.ts index 50b408e..8764730 100644 --- a/snapshots/has.ts +++ b/snapshots/has.ts @@ -4,7 +4,7 @@ import * as R_has from '../ramda/dist/src/has'; declare const property: Property; declare const object: object; -// @dts-jest:pass -> (object: T) => boolean +// @dts-jest:pass -> (object: {}) => boolean R_has(property); // @dts-jest:pass -> boolean R_has(property)(object); diff --git a/snapshots/hasIn.ts b/snapshots/hasIn.ts index 0bcc3f3..4c38f46 100644 --- a/snapshots/hasIn.ts +++ b/snapshots/hasIn.ts @@ -4,7 +4,7 @@ import * as R_hasIn from '../ramda/dist/src/hasIn'; declare const property: Property; declare const object: object; -// @dts-jest:pass -> (object: T) => boolean +// @dts-jest:pass -> (object: {}) => boolean R_hasIn(property); // @dts-jest:pass -> boolean R_hasIn(property)(object); diff --git a/snapshots/propIs.ts b/snapshots/propIs.ts index f4b84f2..e4d7073 100644 --- a/snapshots/propIs.ts +++ b/snapshots/propIs.ts @@ -2,9 +2,9 @@ import * as R_propIs from '../ramda/dist/src/propIs'; declare const object: object; -// @dts-jest:pass -> (object: U) => object is U & Record<"a", Number> +// @dts-jest:pass -> (object: U) => object is U & Record<"a", Number> R_propIs(Number)('a'); -// @dts-jest:pass -> (object: U) => object is U & Record<"a", Number> +// @dts-jest:pass -> (object: U) => object is U & Record<"a", Number> R_propIs(Number, 'a'); // @dts-jest:pass -> boolean R_propIs(Number)('a')(object); diff --git a/templates/assoc.d.ts b/templates/assoc.d.ts index 032a518..0a06aa1 100644 --- a/templates/assoc.d.ts +++ b/templates/assoc.d.ts @@ -1,4 +1,4 @@ import {Property} from './$types'; -export function $extend(property: K, value: V, object: T): T & Record; -export function $general(property: Property, value: any, object: T): T; +export function $extend(property: K, value: V, object: T): T & Record; +export function $general(property: Property, value: any, object: T): T; diff --git a/templates/assocPath.d.ts b/templates/assocPath.d.ts index a70cb34..e3f96e0 100644 --- a/templates/assocPath.d.ts +++ b/templates/assocPath.d.ts @@ -1,3 +1,3 @@ import {Path} from './$types'; -export function $(path: Path, value: any, object: T): T; +export function $(path: Path, value: any, object: T): T; diff --git a/templates/dissoc.d.ts b/templates/dissoc.d.ts index 585258f..e3f8404 100644 --- a/templates/dissoc.d.ts +++ b/templates/dissoc.d.ts @@ -1,6 +1,6 @@ import {Omit} from './$operation'; import {Property} from './$types'; -export function $keyof(property: K, object: T): Omit; +export function $keyof(property: K, object: T): Omit; export function $record, K extends string>(property: K, object: T): Omit; -export function $general(property: Property, object: T): T; +export function $general(property: Property, object: T): T; diff --git a/templates/dissocPath.d.ts b/templates/dissocPath.d.ts index d1b5de5..cb4fbae 100644 --- a/templates/dissocPath.d.ts +++ b/templates/dissocPath.d.ts @@ -1,4 +1,4 @@ import {DeepPartial} from './$operation'; import {Path} from './$types'; -export function $(path: Path, object: T): DeepPartial; +export function $(path: Path, object: T): DeepPartial; diff --git a/templates/has.d.ts b/templates/has.d.ts index 3d57c4f..fb5b7eb 100644 --- a/templates/has.d.ts +++ b/templates/has.d.ts @@ -1,3 +1,3 @@ import {Property} from './$types'; -export function $(property: Property, object: T): boolean; +export function $(property: Property, object: {}): boolean; diff --git a/templates/hasIn.d.ts b/templates/hasIn.d.ts index 3d57c4f..fb5b7eb 100644 --- a/templates/hasIn.d.ts +++ b/templates/hasIn.d.ts @@ -1,3 +1,3 @@ import {Property} from './$types'; -export function $(property: Property, object: T): boolean; +export function $(property: Property, object: {}): boolean; diff --git a/templates/pick.d.ts b/templates/pick.d.ts index b428329..ee919d5 100644 --- a/templates/pick.d.ts +++ b/templates/pick.d.ts @@ -1,5 +1,5 @@ import {List, Property} from './$types'; -export function $keyof(keys: List, object: T): Pick; +export function $keyof(keys: List, object: T): Pick; export function $record, K extends string>(keys: List, object: T): Pick; -export function $general(keys: List, object: T): Partial; +export function $general(keys: List, object: T): Partial; diff --git a/templates/pickAll.d.ts b/templates/pickAll.d.ts index fb29a2d..53bf29d 100644 --- a/templates/pickAll.d.ts +++ b/templates/pickAll.d.ts @@ -1,4 +1,4 @@ import {List, Property} from './$types'; -export function $pick(keys: List, object: T): Pick; -export function $general(keys: List, object: T): Partial; +export function $pick(keys: List, object: T): Pick; +export function $general(keys: List, object: T): Partial; diff --git a/templates/pickBy.d.ts b/templates/pickBy.d.ts index 652a091..b812026 100644 --- a/templates/pickBy.d.ts +++ b/templates/pickBy.d.ts @@ -1,3 +1,3 @@ import {Dictionary, KeyedObjectMorphism} from './$types'; -export function $>(fn: KeyedObjectMorphism, object: U): Partial; +export function $>(fn: KeyedObjectMorphism, object: U): Partial; diff --git a/templates/prop.d.ts b/templates/prop.d.ts index 79abcc1..aa8dad2 100644 --- a/templates/prop.d.ts +++ b/templates/prop.d.ts @@ -1,5 +1,5 @@ import {List, Property} from './$types'; -export function $keyof(key: K, object: T): T[K]; +export function $keyof(key: K, object: T): T[K]; export function $record>(key: K, object: T): T[K]; export function $general(key: Property, object: {}): any; diff --git a/templates/propIs.d.ts b/templates/propIs.d.ts index e976c60..1fa4087 100644 --- a/templates/propIs.d.ts +++ b/templates/propIs.d.ts @@ -1,4 +1,4 @@ import {Constructor, Property} from './$types'; -export function $guard(constructor: Constructor, key: K, object: U): object is U & Record; +export function $guard(constructor: Constructor, key: K, object: U): object is U & Record; export function $general(constructor: Constructor, key: Property, object: {}): boolean; diff --git a/templates/propOr.d.ts b/templates/propOr.d.ts index ea78740..dc98388 100644 --- a/templates/propOr.d.ts +++ b/templates/propOr.d.ts @@ -1,5 +1,5 @@ import {List, Property} from './$types'; -export function $keyof(defaults: D, key: K, object: T): T[K] | D; +export function $keyof(defaults: D, key: K, object: T): T[K] | D; export function $record>(defaults: D, key: K, object: T): T[K] | D; export function $general(defaults: any, key: Property, object: {}): any; diff --git a/templates/propSatisfies.d.ts b/templates/propSatisfies.d.ts index 4751c13..9e8c935 100644 --- a/templates/propSatisfies.d.ts +++ b/templates/propSatisfies.d.ts @@ -1,5 +1,5 @@ import {Predicate, Property} from './$types'; -export function $keyof(fn: Predicate, key: K, object: T): boolean; +export function $keyof(fn: Predicate, key: K, object: T): boolean; export function $record>(fn: Predicate, key: K, object: T): boolean; export function $general(fn: Predicate, key: Property, object: {}): boolean; diff --git a/templates/props.d.ts b/templates/props.d.ts index 58fc525..2b177aa 100644 --- a/templates/props.d.ts +++ b/templates/props.d.ts @@ -1,5 +1,5 @@ import {List, Property} from './$types'; -export function $keyof(keys: List, object: T): T[K][]; +export function $keyof(keys: List, object: T): T[K][]; export function $record>(keys: List, object: T): T[K][]; export function $general(keys: Property[], object: {}): any[]; diff --git a/templates/values.d.ts b/templates/values.d.ts index c31043d..a511396 100644 --- a/templates/values.d.ts +++ b/templates/values.d.ts @@ -1 +1 @@ -export function $(value: T): T[keyof T][]; +export function $(value: T): T[keyof T][]; diff --git a/templates/valuesIn.d.ts b/templates/valuesIn.d.ts index c31043d..a511396 100644 --- a/templates/valuesIn.d.ts +++ b/templates/valuesIn.d.ts @@ -1 +1 @@ -export function $(value: T): T[keyof T][]; +export function $(value: T): T[keyof T][]; diff --git a/tests/__snapshots__/has.ts.snap b/tests/__snapshots__/has.ts.snap index e57bfed..113e898 100644 --- a/tests/__snapshots__/has.ts.snap +++ b/tests/__snapshots__/has.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`R_has(property) 1`] = `"(object: T) => boolean"`; +exports[`R_has(property) 1`] = `"(object: {}) => boolean"`; exports[`R_has(property)(object) 1`] = `"boolean"`; diff --git a/tests/__snapshots__/hasIn.ts.snap b/tests/__snapshots__/hasIn.ts.snap index c6ef6dd..284a5cc 100644 --- a/tests/__snapshots__/hasIn.ts.snap +++ b/tests/__snapshots__/hasIn.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`R_hasIn(property) 1`] = `"(object: T) => boolean"`; +exports[`R_hasIn(property) 1`] = `"(object: {}) => boolean"`; exports[`R_hasIn(property)(object) 1`] = `"boolean"`; diff --git a/tests/__snapshots__/propIs.ts.snap b/tests/__snapshots__/propIs.ts.snap index 4f83b13..048e579 100644 --- a/tests/__snapshots__/propIs.ts.snap +++ b/tests/__snapshots__/propIs.ts.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`R_propIs(Number)('a') 1`] = `"(object: U) => object is U & Record<\\"a\\", Number>"`; +exports[`R_propIs(Number)('a') 1`] = `"(object: U) => object is U & Record<\\"a\\", Number>"`; exports[`R_propIs(Number)('a')(object) 1`] = `"boolean"`; -exports[`R_propIs(Number, 'a') 1`] = `"(object: U) => object is U & Record<\\"a\\", Number>"`; +exports[`R_propIs(Number, 'a') 1`] = `"(object: U) => object is U & Record<\\"a\\", Number>"`; exports[`R_propIs(Number, 'a', object) 1`] = `"boolean"`;