import { expectType } from 'tsd' ; import set from '../fp/set' ; const someObj = { } ; const anyValue = 'any value' ; expectType < object > ( set ( 'a.b.c' , anyValue , someObj ) ) ; expectType < object > ( set ( 'a.b.c' ) ( anyValue , someObj ) ) ; expectType < object > ( set ( 'a.b.c' ) ( anyValue ) ( someObj ) ) ; expectType < object > ( set ( 'a.b.c' , anyValue ) ( someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' ] , anyValue , someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' ] ) ( anyValue , someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' ] ) ( anyValue ) ( someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' ] , anyValue ) ( someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' , 2 , Symbol ( 'hep' ) ] , anyValue , someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' , 2 , Symbol ( 'hep' ) ] ) ( anyValue , someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' , 2 , Symbol ( 'hep' ) ] ) ( anyValue ) ( someObj ) ) ; expectType < object > ( set ( [ 'a.b.c' , 2 , Symbol ( 'hep' ) ] , anyValue ) ( someObj ) ) ;