diff --git a/__tests__/Function/after.test.ts b/__tests__/Function/after.test.ts index 6658f3c..928851f 100644 --- a/__tests__/Function/after.test.ts +++ b/__tests__/Function/after.test.ts @@ -1,6 +1,6 @@ import { expectType } from 'ts-expect' -import { F, N, O, Option } from '../..' +import { F, N, O } from '../..' const fn = (n: number) => { return `called ${n} times` @@ -12,9 +12,9 @@ const fn2 = (n: number, x: string) => { describe('after', () => { it('provides correct types', () => { - expectType<(n: number) => Option>(F.after(2, fn)) + expectType<(n: number) => O.Option>(F.after(2, fn)) expectType<(n: number, x: string) => string>(F.after(2, fn2)) - expectType<(n: number) => Option>(F.after(2, N.add(2))) + expectType<(n: number) => O.Option>(F.after(2, N.add(2))) }) it('handles multiple parameters', function () { diff --git a/__tests__/Function/tryCatch.test.ts b/__tests__/Function/tryCatch.test.ts index 293130e..1d46c93 100644 --- a/__tests__/Function/tryCatch.test.ts +++ b/__tests__/Function/tryCatch.test.ts @@ -1,6 +1,6 @@ import { expectType } from 'ts-expect' -import { R, Result, F, pipe, O } from '../..' +import { R, F, pipe, O } from '../..' type User = { readonly name: string @@ -12,11 +12,11 @@ const throwError = (_x: number): number => { describe('tryCatch', () => { it('provides correct types', () => { - expectType>(F.tryCatch('<>', JSON.parse)) - expectType>( + expectType>(F.tryCatch('<>', JSON.parse)) + expectType>( F.tryCatch('{"name": "Joe"}', JSON.parse), ) - expectType>(F.tryCatch(1, throwError)) + expectType>(F.tryCatch(1, throwError)) F.tryCatch('hello', str => { expectType(str) }) @@ -48,11 +48,11 @@ describe('tryCatch', () => { describe('tryCatch (pipe)', () => { it('provides correct types', () => { - expectType>(pipe('<>', F.tryCatch(JSON.parse))) - expectType>( + expectType>(pipe('<>', F.tryCatch(JSON.parse))) + expectType>( pipe('{"name": "Joe"}', F.tryCatch(JSON.parse)), ) - expectType>(F.tryCatch(1, throwError)) + expectType>(F.tryCatch(1, throwError)) pipe( 'hello', F.tryCatch(str => { diff --git a/src/index.ts b/src/index.ts index 4951636..47e4819 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,6 @@ export { pipe } from './pipe' export { flow } from './flow' -export { Option } from './Option' -export { Result, Ok, Error } from './Result' - export * as F from './Function' export * as A from './Array' export * as R from './Result'