diff --git a/.eslintrc.json b/.eslintrc.json index 6e6ed8c048..138c396223 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,7 @@ "@typescript-eslint/member-delimiter-style": 0, "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-empty-interface": "off", "no-unused-vars": "off", diff --git a/dtslint/ts3.5/Applicative.ts b/dtslint/Applicative.ts similarity index 63% rename from dtslint/ts3.5/Applicative.ts rename to dtslint/Applicative.ts index c7b9c414d5..de8d4661fa 100644 --- a/dtslint/ts3.5/Applicative.ts +++ b/dtslint/Applicative.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Applicative' -import * as E from '../../src/Either' -import * as S from '../../src/Semigroup' -import * as R from '../../src/Reader' +import * as _ from '../src/Applicative' +import * as E from '../src/Either' +import * as R from '../src/Reader' +import * as S from '../src/Semigroup' // // getApplicativeComposition diff --git a/dtslint/ts3.5/Apply.ts b/dtslint/Apply.ts similarity index 76% rename from dtslint/ts3.5/Apply.ts rename to dtslint/Apply.ts index ff502decc1..c58546dc1b 100644 --- a/dtslint/ts3.5/Apply.ts +++ b/dtslint/Apply.ts @@ -1,22 +1,21 @@ -import * as _ from '../../src/Apply' -import { URIS, Kind } from '../../src/HKT' -import * as RTE from '../../src/ReaderTaskEither' -import * as E from '../../src/Either' -import { pipe } from '../../src/function' -import * as Fu from '../../src/Functor' +import * as _ from '../src/Apply' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as Fu from '../src/Functor' +import { Kind, URIS } from '../src/HKT' +import * as RTE from '../src/ReaderTaskEither' // // apS // -export const apS = (F: _.Apply1) => ( - s: Kind, - n: Kind -): Kind => { - const apS = _.apS(F) - const bindTo = Fu.bindTo(F) - return pipe(s, bindTo('s'), apS('n', n)) -} +export const apS = + (F: _.Apply1) => + (s: Kind, n: Kind): Kind => { + const apS = _.apS(F) + const bindTo = Fu.bindTo(F) + return pipe(s, bindTo('s'), apS('n', n)) + } // // sequenceS @@ -35,9 +34,9 @@ declare const sequenceS4: E.Either const sequenceSf1 = _.sequenceS(E.either) -// $ExpectError +// @ts-expect-error sequenceSf1({}) -// $ExpectError +// @ts-expect-error sequenceSf1({ sequenceS1, sequenceS4 }) sequenceSf1({ sequenceS1, sequenceS2, sequenceS3 }) // $ExpectType Either @@ -49,9 +48,9 @@ declare const sequenceS7: RTE.ReaderTaskEither<{ a: number }, string, boolean> declare const sequenceS8: RTE.ReaderTaskEither<{ a: number }, boolean, void> declare const sequenceS9: RTE.ReaderTaskEither<{ a: string }, string, void> -// $ExpectError +// @ts-expect-error sequenceSf2({ sequenceS5, sequenceS8 }) -// $ExpectError +// @ts-expect-error sequenceSf2({ sequenceS5, sequenceS9 }) sequenceSf2({ sequenceS5, sequenceS6, sequenceS7 }) // $ExpectType ReaderTaskEither<{ a: number; }, string, { sequenceS5: number; sequenceS6: string; sequenceS7: boolean; }> @@ -68,18 +67,18 @@ sequenceSf2({ sequenceS5, sequenceS6, sequenceS7 }) // $ExpectType ReaderTaskEit const sequenceTf1 = _.sequenceT(E.either) -// $ExpectError +// @ts-expect-error sequenceTf1([]) -// $ExpectError +// @ts-expect-error sequenceTf1(sequenceS1, sequenceS4) sequenceTf1(sequenceS1, sequenceS2, sequenceS3) // $ExpectType Either const sequenceTf2 = _.sequenceT(RTE.readerTaskEither) -// $ExpectError +// @ts-expect-error sequenceTf2(sequenceS5, sequenceS8) -// $ExpectError +// @ts-expect-error sequenceTf2(sequenceS5, sequenceS9) sequenceTf2(sequenceS5, sequenceS6, sequenceS7) // $ExpectType ReaderTaskEither<{ a: number; }, string, [number, string, boolean]> diff --git a/dtslint/ts3.5/Array.ts b/dtslint/Array.ts similarity index 93% rename from dtslint/ts3.5/Array.ts rename to dtslint/Array.ts index 3d28509229..675d6469eb 100644 --- a/dtslint/ts3.5/Array.ts +++ b/dtslint/Array.ts @@ -1,8 +1,8 @@ -import * as _ from '../../src/Array' -import { identity, pipe } from '../../src/function' -import * as N from '../../src/number' -import { Ord } from '../../src/Ord' -import * as E from '../../src/Either' +import * as _ from '../src/Array' +import * as E from '../src/Either' +import { identity, pipe } from '../src/function' +import * as N from '../src/number' +import { Ord } from '../src/Ord' declare const us: Array declare const ns: Array @@ -177,7 +177,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -195,8 +195,8 @@ pipe( prns, _.filterWithIndex( ( - i, // $ExpectType number - x // $ExpectType number + _i, // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -216,7 +216,7 @@ pipe( prns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -236,8 +236,8 @@ pipe( prns, _.partitionWithIndex( ( - i, // $ExpectType number - x // $ExpectType number + _i, // $ExpectType number + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Console.ts b/dtslint/Console.ts similarity index 75% rename from dtslint/ts3.5/Console.ts rename to dtslint/Console.ts index a2dff56f73..ce5dfd8f7d 100644 --- a/dtslint/ts3.5/Console.ts +++ b/dtslint/Console.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/Console' -import { flow, pipe } from '../../src/function' -import * as TE from '../../src/TaskEither' +import * as _ from '../src/Console' +import { flow, pipe } from '../src/function' +import * as TE from '../src/TaskEither' // $ExpectType TaskEither pipe(TE.right('a'), TE.chainFirst(flow(_.error, TE.fromIO))) diff --git a/dtslint/ts3.5/Const.ts b/dtslint/Const.ts similarity index 77% rename from dtslint/ts3.5/Const.ts rename to dtslint/Const.ts index b6ee4095b4..a7d05d3039 100644 --- a/dtslint/ts3.5/Const.ts +++ b/dtslint/Const.ts @@ -1,4 +1,4 @@ -import * as _ from '../../src/Const' +import * as _ from '../src/Const' // // contramap diff --git a/dtslint/ts3.5/Either.ts b/dtslint/Either.ts similarity index 89% rename from dtslint/ts3.5/Either.ts rename to dtslint/Either.ts index 41531c4c98..b5a0d1048a 100644 --- a/dtslint/ts3.5/Either.ts +++ b/dtslint/Either.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/Either' -import { pipe, flow, identity } from '../../src/function' -import * as RA from '../../src/ReadonlyArray' +import * as _ from '../src/Either' +import { flow, identity, pipe } from '../src/function' +import * as RA from '../src/ReadonlyArray' // // getOrElseW @@ -122,7 +122,7 @@ pipe( n, _.fromPredicate( ( - n // $ExpectType number + _n // $ExpectType number ) => true, () => false ) @@ -147,7 +147,7 @@ pipe( en, _.filterOrElse( ( - n // $ExpectType number + _n // $ExpectType number ) => true, () => false ) @@ -157,5 +157,5 @@ pipe( // exists // -declare const es: _.Either[] -const x = pipe(es, RA.filter(_.exists((n) => n > 0))) +declare const es: Array<_.Either> +pipe(es, RA.filter(_.exists((n) => n > 0))) diff --git a/dtslint/ts3.5/Eq.ts b/dtslint/Eq.ts similarity index 70% rename from dtslint/ts3.5/Eq.ts rename to dtslint/Eq.ts index 14dd6c1025..533604ab47 100644 --- a/dtslint/ts3.5/Eq.ts +++ b/dtslint/Eq.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Eq' -import * as S from '../../src/string' -import * as N from '../../src/number' -import * as B from '../../src/boolean' +import * as B from '../src/boolean' +import * as _ from '../src/Eq' +import * as N from '../src/number' +import * as S from '../src/string' // // struct diff --git a/dtslint/ts3.5/Functor.ts b/dtslint/Functor.ts similarity index 60% rename from dtslint/ts3.5/Functor.ts rename to dtslint/Functor.ts index b262926d47..9ed81961af 100644 --- a/dtslint/ts3.5/Functor.ts +++ b/dtslint/Functor.ts @@ -1,22 +1,22 @@ -import * as _ from '../../src/Functor' -import * as RA from '../../src/ReadonlyArray' -import * as E from '../../src/Either' -import * as RTE from '../../src/ReaderTaskEither' +import * as E from '../src/Either' +import * as _ from '../src/Functor' +import * as RTE from '../src/ReaderTaskEither' +import * as RA from '../src/ReadonlyArray' // $ExpectType (f: (a: A) => B) => (fa: readonly (readonly A[])[]) => readonly (readonly B[])[] -const F11 = _.map(RA.Functor, RA.Functor) +export const F11 = _.map(RA.Functor, RA.Functor) // $ExpectType (f: (a: A) => B) => (fa: readonly Either[]) => readonly Either[] -const F12 = _.map(RA.Functor, E.Functor) +export const F12 = _.map(RA.Functor, E.Functor) // $ExpectType (f: (a: A) => B) => (fa: readonly ReaderTaskEither[]) => readonly ReaderTaskEither[] -const F13 = _.map(RA.Functor, RTE.Functor) +export const F13 = _.map(RA.Functor, RTE.Functor) // $ExpectType (f: (a: A) => B) => (fa: Either) => Either -const F21 = _.map(E.Functor, RA.Functor) +export const F21 = _.map(E.Functor, RA.Functor) // $ExpectType (f: (a: A) => B) => (fa: Either>) => Either> -const F22 = _.map(E.Functor, E.Functor) +export const F22 = _.map(E.Functor, E.Functor) // $ExpectType (f: (a: A) => B) => (fa: ReaderTaskEither) => ReaderTaskEither -const F31 = _.map(RTE.Functor, RA.Functor) +export const F31 = _.map(RTE.Functor, RA.Functor) diff --git a/dtslint/ts3.5/IO.ts b/dtslint/IO.ts similarity index 67% rename from dtslint/ts3.5/IO.ts rename to dtslint/IO.ts index 499e4ae27c..8285ec5ff0 100644 --- a/dtslint/ts3.5/IO.ts +++ b/dtslint/IO.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/IO' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/IO' // // Do diff --git a/dtslint/ts3.5/IOEither.ts b/dtslint/IOEither.ts similarity index 93% rename from dtslint/ts3.5/IOEither.ts rename to dtslint/IOEither.ts index 55acb3c560..a9e7ad94d2 100644 --- a/dtslint/ts3.5/IOEither.ts +++ b/dtslint/IOEither.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/IOEither' -import * as IO from '../../src/IO' -import * as E from '../../src/Either' -import { pipe } from '../../src/function' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as IO from '../src/IO' +import * as _ from '../src/IOEither' // // getOrElseW diff --git a/dtslint/ts3.5/Identity.ts b/dtslint/Identity.ts similarity index 65% rename from dtslint/ts3.5/Identity.ts rename to dtslint/Identity.ts index c50d07c9c5..aa3082c1f0 100644 --- a/dtslint/ts3.5/Identity.ts +++ b/dtslint/Identity.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Identity' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/Identity' // // Do diff --git a/dtslint/ts3.5/Json.ts b/dtslint/Json.ts similarity index 70% rename from dtslint/ts3.5/Json.ts rename to dtslint/Json.ts index 8e568d1c8e..ab7b2974d0 100644 --- a/dtslint/ts3.5/Json.ts +++ b/dtslint/Json.ts @@ -1,20 +1,22 @@ -import * as E from '../../src/Either' -import { pipe } from '../../src/function' -import * as _ from '../../src/Json' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as _ from '../src/Json' // // stringify // -// $ExpectError +// @ts-expect-error _.stringify<_.Json>(undefined) -// $ExpectError -_.stringify<_.Json>(() => {}) -// $ExpectError +// @ts-expect-error +_.stringify<_.Json>(() => { + return +}) +// @ts-expect-error _.stringify<_.Json>(Symbol()) -// $ExpectError +// @ts-expect-error _.stringify<_.Json>({ a: undefined }) -// $ExpectError +// @ts-expect-error _.stringify<_.Json>({ ...{ a: undefined } }) // tslint:disable-next-line: interface-over-type-literal diff --git a/dtslint/ts3.5/Map.ts b/dtslint/Map.ts similarity index 89% rename from dtslint/ts3.5/Map.ts rename to dtslint/Map.ts index 6df164788c..007d70e899 100644 --- a/dtslint/ts3.5/Map.ts +++ b/dtslint/Map.ts @@ -1,8 +1,8 @@ -import * as _ from '../../src/Map' -import * as S from '../../src/string' -import * as N from '../../src/number' -import { pipe } from '../../src/function' -import * as E from '../../src/Either' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as _ from '../src/Map' +import * as N from '../src/number' +import * as S from '../src/string' // // member @@ -65,7 +65,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -83,8 +83,8 @@ pipe( prns, _.filterWithIndex( ( - k, // $ExpectType string - x // $ExpectType number + _k, // $ExpectType string + _x // $ExpectType number ) => true ) ) @@ -104,7 +104,7 @@ pipe( prns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -124,8 +124,8 @@ pipe( prns, _.partitionWithIndex( ( - k, // $ExpectType string - x // $ExpectType number + _k, // $ExpectType string + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Monoid.ts b/dtslint/Monoid.ts similarity index 73% rename from dtslint/ts3.5/Monoid.ts rename to dtslint/Monoid.ts index c4e4a43f0c..7e1f4c0a38 100644 --- a/dtslint/ts3.5/Monoid.ts +++ b/dtslint/Monoid.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Monoid' -import * as S from '../../src/string' -import * as N from '../../src/number' -import * as B from '../../src/boolean' +import * as B from '../src/boolean' +import * as _ from '../src/Monoid' +import * as N from '../src/number' +import * as S from '../src/string' // // struct diff --git a/dtslint/ts3.5/NonEmptyArray.ts b/dtslint/NonEmptyArray.ts similarity index 95% rename from dtslint/ts3.5/NonEmptyArray.ts rename to dtslint/NonEmptyArray.ts index 971608bba8..c6d0b4f784 100644 --- a/dtslint/ts3.5/NonEmptyArray.ts +++ b/dtslint/NonEmptyArray.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/NonEmptyArray' -import { Ord } from '../../src/Ord' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/NonEmptyArray' +import { Ord } from '../src/Ord' declare const as: Array declare const neas: _.NonEmptyArray diff --git a/dtslint/ts3.5/Option.ts b/dtslint/Option.ts similarity index 91% rename from dtslint/ts3.5/Option.ts rename to dtslint/Option.ts index 95419307e8..cc0ba8dab2 100644 --- a/dtslint/ts3.5/Option.ts +++ b/dtslint/Option.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Option' -import { pipe, flow } from '../../src/function' +import { flow, pipe } from '../src/function' +import * as _ from '../src/Option' // // getOrElseW @@ -61,7 +61,7 @@ pipe( on, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -81,7 +81,7 @@ pipe( on, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -99,7 +99,7 @@ pipe( n, _.fromPredicate( ( - n // $ExpectType number + _n // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Ord.ts b/dtslint/Ord.ts similarity index 59% rename from dtslint/ts3.5/Ord.ts rename to dtslint/Ord.ts index 5f56bff50c..b94f42ece3 100644 --- a/dtslint/ts3.5/Ord.ts +++ b/dtslint/Ord.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Ord' -import * as S from '../../src/string' -import * as N from '../../src/number' -import * as B from '../../src/boolean' +import * as B from '../src/boolean' +import * as N from '../src/number' +import * as _ from '../src/Ord' +import * as S from '../src/string' // // tuple diff --git a/dtslint/ts3.5/Reader.ts b/dtslint/Reader.ts similarity index 82% rename from dtslint/ts3.5/Reader.ts rename to dtslint/Reader.ts index fb3081eb9c..77b1d145cc 100644 --- a/dtslint/ts3.5/Reader.ts +++ b/dtslint/Reader.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Reader' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/Reader' // // chainW diff --git a/dtslint/ts3.5/ReaderEither.ts b/dtslint/ReaderEither.ts similarity index 94% rename from dtslint/ts3.5/ReaderEither.ts rename to dtslint/ReaderEither.ts index d5bdf28abe..2fdd8c0d2d 100644 --- a/dtslint/ts3.5/ReaderEither.ts +++ b/dtslint/ReaderEither.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/ReaderEither' -import * as R from '../../src/Reader' -import * as E from '../../src/Either' -import { pipe } from '../../src/function' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as R from '../src/Reader' +import * as _ from '../src/ReaderEither' // // getOrElseW diff --git a/dtslint/ts3.5/ReaderT.ts b/dtslint/ReaderT.ts similarity index 80% rename from dtslint/ts3.5/ReaderT.ts rename to dtslint/ReaderT.ts index dc76d3b42c..9cc471068e 100644 --- a/dtslint/ts3.5/ReaderT.ts +++ b/dtslint/ReaderT.ts @@ -1,8 +1,8 @@ -import * as _ from '../../src/ReaderT' -import * as TE from '../../src/TaskEither' -import * as TTH from '../../src/TaskThese' -import * as RTE from '../../src/ReaderTaskEither' -import * as SRTE from '../../src/StateReaderTaskEither' +import * as _ from '../src/ReaderT' +import * as RTE from '../src/ReaderTaskEither' +import * as SRTE from '../src/StateReaderTaskEither' +import * as TE from '../src/TaskEither' +import * as TTH from '../src/TaskThese' // $ExpectType (f: (r: R) => Either) => Reader> _.fromNaturalTransformation<'Either', 'TaskEither'>(TE.fromEither) diff --git a/dtslint/ts3.5/ReaderTask.ts b/dtslint/ReaderTask.ts similarity index 85% rename from dtslint/ts3.5/ReaderTask.ts rename to dtslint/ReaderTask.ts index 20fb84af1a..34385ae954 100644 --- a/dtslint/ts3.5/ReaderTask.ts +++ b/dtslint/ReaderTask.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/ReaderTask' -import * as RIO from '../../src/ReaderIO' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as RIO from '../src/ReaderIO' +import * as _ from '../src/ReaderTask' interface R1 { foo: string @@ -45,7 +45,8 @@ pipe( ) pipe( - _.of(1), // $ExpectError + // @ts-expect-error + _.of(1), _.chainReaderIOK(() => RIO.of(true)) ) @@ -70,7 +71,8 @@ pipe( ) pipe( - _.of(1), // $ExpectError + // @ts-expect-error + _.of(1), _.chainFirstReaderIOK(() => RIO.of(true)) ) diff --git a/dtslint/ts3.5/ReaderTaskEither.ts b/dtslint/ReaderTaskEither.ts similarity index 92% rename from dtslint/ts3.5/ReaderTaskEither.ts rename to dtslint/ReaderTaskEither.ts index 6b82da4436..3f0b74fddd 100644 --- a/dtslint/ts3.5/ReaderTaskEither.ts +++ b/dtslint/ReaderTaskEither.ts @@ -1,10 +1,10 @@ -import * as _ from '../../src/ReaderTaskEither' -import * as RIO from '../../src/ReaderIO' -import * as RT from '../../src/ReaderTask' -import * as E from '../../src/Either' -import * as TE from '../../src/TaskEither' -import * as IOE from '../../src/IOEither' -import { pipe } from '../../src/function' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as IOE from '../src/IOEither' +import * as RIO from '../src/ReaderIO' +import * as RT from '../src/ReaderTask' +import * as _ from '../src/ReaderTaskEither' +import * as TE from '../src/TaskEither' // // rightReaderIO @@ -159,7 +159,8 @@ pipe( pipe( _.right<{ a: string }, string, number>(1), - _.chainReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) // $ExpectError + // @ts-expect-error + _.chainReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) ) // @@ -184,7 +185,8 @@ pipe( pipe( _.right<{ a: string }, string, number>(1), - _.chainFirstReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) // $ExpectError + // @ts-expect-error + _.chainFirstReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) ) // @@ -230,7 +232,8 @@ pipe( pipe( _.right<{ a: string }, string, number>(1), - _.chainReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) // $ExpectError + // @ts-expect-error + _.chainReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) ) // @@ -255,7 +258,8 @@ pipe( pipe( _.right<{ a: string }, string, number>(1), - _.chainFirstReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) // $ExpectError + // @ts-expect-error + _.chainFirstReaderIOK(() => RIO.of<{ b: number }, boolean>(true)) ) // diff --git a/dtslint/ts3.5/ReadonlyArray.ts b/dtslint/ReadonlyArray.ts similarity index 94% rename from dtslint/ts3.5/ReadonlyArray.ts rename to dtslint/ReadonlyArray.ts index 35b52313a7..a0ae7b8e86 100644 --- a/dtslint/ts3.5/ReadonlyArray.ts +++ b/dtslint/ReadonlyArray.ts @@ -1,8 +1,8 @@ -import * as _ from '../../src/ReadonlyArray' -import { identity, pipe } from '../../src/function' -import * as N from '../../src/number' -import { Ord } from '../../src/Ord' -import * as E from '../../src/Either' +import * as E from '../src/Either' +import { identity, pipe } from '../src/function' +import * as N from '../src/number' +import { Ord } from '../src/Ord' +import * as _ from '../src/ReadonlyArray' declare const rus: ReadonlyArray declare const rns: ReadonlyArray @@ -177,7 +177,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -207,7 +207,7 @@ _.filter(p)(registereds) // $ExpectType readonly Registered[] interface Test { test: string } -declare const arrayOfTest: Test[] +declare const arrayOfTest: Array const isFoo = (t: T) => t.test === 'foo' pipe(arrayOfTest, _.filter(isFoo)) // $ExpectType readonly Test[] @@ -224,8 +224,8 @@ pipe( prns, _.filterWithIndex( ( - i, // $ExpectType number - x // $ExpectType number + _i, // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -245,7 +245,7 @@ pipe( rns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -265,8 +265,8 @@ pipe( prns, _.partitionWithIndex( ( - i, // $ExpectType number - x // $ExpectType number + _i, // $ExpectType number + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/ReadonlyMap.ts b/dtslint/ReadonlyMap.ts similarity index 90% rename from dtslint/ts3.5/ReadonlyMap.ts rename to dtslint/ReadonlyMap.ts index 44aec6d933..c8f27011db 100644 --- a/dtslint/ts3.5/ReadonlyMap.ts +++ b/dtslint/ReadonlyMap.ts @@ -1,8 +1,8 @@ -import * as _ from '../../src/ReadonlyMap' -import * as N from '../../src/number' -import * as S from '../../src/string' -import { pipe } from '../../src/function' -import * as E from '../../src/Either' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as N from '../src/number' +import * as _ from '../src/ReadonlyMap' +import * as S from '../src/string' // // member @@ -65,7 +65,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -83,8 +83,8 @@ pipe( prns, _.filterWithIndex( ( - k, // $ExpectType string - x // $ExpectType number + _k, // $ExpectType string + _x // $ExpectType number ) => true ) ) @@ -104,7 +104,7 @@ pipe( prns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -124,8 +124,8 @@ pipe( prns, _.partitionWithIndex( ( - k, // $ExpectType string - x // $ExpectType number + _k, // $ExpectType string + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/ReadonlyNonEmptyArray.ts b/dtslint/ReadonlyNonEmptyArray.ts similarity index 96% rename from dtslint/ts3.5/ReadonlyNonEmptyArray.ts rename to dtslint/ReadonlyNonEmptyArray.ts index abe8f13f30..42b6f5e7d3 100644 --- a/dtslint/ts3.5/ReadonlyNonEmptyArray.ts +++ b/dtslint/ReadonlyNonEmptyArray.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/ReadonlyNonEmptyArray' -import { pipe } from '../../src/function' -import { Ord } from '../../src/Ord' +import { pipe } from '../src/function' +import { Ord } from '../src/Ord' +import * as _ from '../src/ReadonlyNonEmptyArray' declare const ras: ReadonlyArray declare const rneas: _.ReadonlyNonEmptyArray diff --git a/dtslint/ts3.5/ReadonlyRecord.ts b/dtslint/ReadonlyRecord.ts similarity index 94% rename from dtslint/ts3.5/ReadonlyRecord.ts rename to dtslint/ReadonlyRecord.ts index 40e73ff363..222d77c73f 100644 --- a/dtslint/ts3.5/ReadonlyRecord.ts +++ b/dtslint/ReadonlyRecord.ts @@ -1,13 +1,13 @@ -import { pipe, identity } from '../../src/function' -import * as _ from '../../src/ReadonlyRecord' -import * as O from '../../src/Option' -import * as RA from '../../src/ReadonlyArray' -import * as E from '../../src/Either' -import * as N from '../../src/number' -import * as S from '../../src/string' -import { getFirstSemigroup } from '../../src/Semigroup' -import { Foldable } from '../../src/Foldable' -import { HKT } from '../../src/HKT' +import * as E from '../src/Either' +import { Foldable } from '../src/Foldable' +import { identity, pipe } from '../src/function' +import { HKT } from '../src/HKT' +import * as N from '../src/number' +import * as O from '../src/Option' +import * as RA from '../src/ReadonlyArray' +import * as _ from '../src/ReadonlyRecord' +import { getFirstSemigroup } from '../src/Semigroup' +import * as S from '../src/string' declare const do1: { [key: string]: O.Option } declare const ro1: Readonly>> @@ -23,12 +23,15 @@ declare const keyString: string // hasOwnProperty // +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, d1)) { keyString // $ExpectType string } +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, recordString)) { keyString // $ExpectType string } +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, r1)) { keyString // $ExpectType "a1" | "a2" } diff --git a/dtslint/ts3.5/ReadonlySet.ts b/dtslint/ReadonlySet.ts similarity index 90% rename from dtslint/ts3.5/ReadonlySet.ts rename to dtslint/ReadonlySet.ts index 17b3e348b2..b4bdf5a5e9 100644 --- a/dtslint/ts3.5/ReadonlySet.ts +++ b/dtslint/ReadonlySet.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/ReadonlySet' -import * as N from '../../src/number' -import { pipe } from '../../src/function' -import * as E from '../../src/Either' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as N from '../src/number' +import * as _ from '../src/ReadonlySet' declare const me: ReadonlySet @@ -63,7 +63,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -83,7 +83,7 @@ pipe( prns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Record.ts b/dtslint/Record.ts similarity index 93% rename from dtslint/ts3.5/Record.ts rename to dtslint/Record.ts index 044fd1a892..d4c648dc13 100644 --- a/dtslint/ts3.5/Record.ts +++ b/dtslint/Record.ts @@ -1,13 +1,13 @@ -import { pipe, identity } from '../../src/function' -import * as _ from '../../src/Record' -import * as O from '../../src/Option' -import * as A from '../../src/Array' -import * as E from '../../src/Either' -import * as N from '../../src/number' -import * as S from '../../src/string' -import { getFirstSemigroup } from '../../src/Semigroup' -import { Foldable } from '../../src/Foldable' -import { HKT } from '../../src/HKT' +import * as A from '../src/Array' +import * as E from '../src/Either' +import { Foldable } from '../src/Foldable' +import { identity, pipe } from '../src/function' +import { HKT } from '../src/HKT' +import * as N from '../src/number' +import * as O from '../src/Option' +import * as _ from '../src/Record' +import { getFirstSemigroup } from '../src/Semigroup' +import * as S from '../src/string' declare const do1: { [key: string]: O.Option } declare const ro1: Record<'a1' | 'a2', O.Option> @@ -23,12 +23,15 @@ declare const keyString: string // hasOwnProperty // +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, d1)) { keyString // $ExpectType string } +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, recordString)) { keyString // $ExpectType string } +// eslint-disable-next-line no-prototype-builtins if (_.hasOwnProperty(keyString, r1)) { keyString // $ExpectType "a1" | "a2" } diff --git a/dtslint/ts3.5/Ring.ts b/dtslint/Ring.ts similarity index 74% rename from dtslint/ts3.5/Ring.ts rename to dtslint/Ring.ts index ca7f61c31f..a639709208 100644 --- a/dtslint/ts3.5/Ring.ts +++ b/dtslint/Ring.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Ring' -import * as N from '../../src/number' +import * as N from '../src/number' +import * as _ from '../src/Ring' // // tuple diff --git a/dtslint/ts3.5/Semigroup.ts b/dtslint/Semigroup.ts similarity index 79% rename from dtslint/ts3.5/Semigroup.ts rename to dtslint/Semigroup.ts index a266db1191..fe9690c949 100644 --- a/dtslint/ts3.5/Semigroup.ts +++ b/dtslint/Semigroup.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Semigroup' -import * as S from '../../src/string' -import * as N from '../../src/number' -import * as B from '../../src/boolean' +import * as B from '../src/boolean' +import * as N from '../src/number' +import * as _ from '../src/Semigroup' +import * as S from '../src/string' // // struct diff --git a/dtslint/ts3.5/Set.ts b/dtslint/Set.ts similarity index 89% rename from dtslint/ts3.5/Set.ts rename to dtslint/Set.ts index b0a1ca5747..097d688728 100644 --- a/dtslint/ts3.5/Set.ts +++ b/dtslint/Set.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Set' -import * as N from '../../src/number' -import { pipe } from '../../src/function' -import * as E from '../../src/Either' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as N from '../src/number' +import * as _ from '../src/Set' declare const me: Set @@ -63,7 +63,7 @@ pipe( prns, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -83,7 +83,7 @@ pipe( prns, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Show.ts b/dtslint/Show.ts similarity index 62% rename from dtslint/ts3.5/Show.ts rename to dtslint/Show.ts index 115a725dd2..edc793f638 100644 --- a/dtslint/ts3.5/Show.ts +++ b/dtslint/Show.ts @@ -1,7 +1,7 @@ -import * as _ from '../../src/Show' -import * as S from '../../src/string' -import * as N from '../../src/number' -import * as B from '../../src/boolean' +import * as B from '../src/boolean' +import * as N from '../src/number' +import * as _ from '../src/Show' +import * as S from '../src/string' // // struct diff --git a/dtslint/ts3.5/StateReaderTaskEither.ts b/dtslint/StateReaderTaskEither.ts similarity index 89% rename from dtslint/ts3.5/StateReaderTaskEither.ts rename to dtslint/StateReaderTaskEither.ts index 2583a8fc24..7f3d2e5cfe 100644 --- a/dtslint/ts3.5/StateReaderTaskEither.ts +++ b/dtslint/StateReaderTaskEither.ts @@ -1,9 +1,9 @@ -import * as _ from '../../src/StateReaderTaskEither' -import * as E from '../../src/Either' -import * as TE from '../../src/TaskEither' -import * as RTE from '../../src/ReaderTaskEither' -import * as IOE from '../../src/IOEither' -import { pipe } from '../../src/function' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as IOE from '../src/IOEither' +import * as RTE from '../src/ReaderTaskEither' +import * as _ from '../src/StateReaderTaskEither' +import * as TE from '../src/TaskEither' // // chainW diff --git a/dtslint/ts3.5/Task.ts b/dtslint/Task.ts similarity index 67% rename from dtslint/ts3.5/Task.ts rename to dtslint/Task.ts index 08ecbd08f3..ef826d2772 100644 --- a/dtslint/ts3.5/Task.ts +++ b/dtslint/Task.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Task' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/Task' // // Do diff --git a/dtslint/ts3.5/TaskEither.ts b/dtslint/TaskEither.ts similarity index 91% rename from dtslint/ts3.5/TaskEither.ts rename to dtslint/TaskEither.ts index eb86d4ba5f..b073bcba36 100644 --- a/dtslint/ts3.5/TaskEither.ts +++ b/dtslint/TaskEither.ts @@ -1,10 +1,10 @@ -import * as _ from '../../src/TaskEither' -import * as T from '../../src/Task' -import * as E from '../../src/Either' -import * as TO from '../../src/TaskOption' -import * as IO from '../../src/IO' -import * as IOE from '../../src/IOEither' -import { pipe } from '../../src/function' +import * as E from '../src/Either' +import { pipe } from '../src/function' +import * as IO from '../src/IO' +import * as IOE from '../src/IOEither' +import * as T from '../src/Task' +import * as _ from '../src/TaskEither' +import * as TO from '../src/TaskOption' // // getOrElseW diff --git a/dtslint/ts3.5/TaskOption.ts b/dtslint/TaskOption.ts similarity index 88% rename from dtslint/ts3.5/TaskOption.ts rename to dtslint/TaskOption.ts index 97c1b689b7..94e002efc0 100644 --- a/dtslint/ts3.5/TaskOption.ts +++ b/dtslint/TaskOption.ts @@ -1,6 +1,6 @@ -import * as _ from '../../src/TaskOption' -import * as TE from '../../src/TaskEither' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as TE from '../src/TaskEither' +import * as _ from '../src/TaskOption' declare const tesn: TE.TaskEither @@ -35,7 +35,7 @@ pipe( on, _.filter( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -55,7 +55,7 @@ pipe( on, _.partition( ( - x // $ExpectType number + _x // $ExpectType number ) => true ) ) @@ -73,7 +73,7 @@ pipe( n, _.fromPredicate( ( - n // $ExpectType number + _n // $ExpectType number ) => true ) ) diff --git a/dtslint/ts3.5/Traversable.ts b/dtslint/Traversable.ts similarity index 71% rename from dtslint/ts3.5/Traversable.ts rename to dtslint/Traversable.ts index ec7714f498..a768faee84 100644 --- a/dtslint/ts3.5/Traversable.ts +++ b/dtslint/Traversable.ts @@ -1,7 +1,7 @@ -import * as RA from '../../src/ReadonlyArray' -import * as E from '../../src/Either' -import * as _ from '../../src/Traversable' -import * as TE from '../../src/TaskEither' +import * as E from '../src/Either' +import * as RA from '../src/ReadonlyArray' +import * as TE from '../src/TaskEither' +import * as _ from '../src/Traversable' // // traversable diff --git a/dtslint/ts3.5/Tree.ts b/dtslint/Tree.ts similarity index 67% rename from dtslint/ts3.5/Tree.ts rename to dtslint/Tree.ts index baae87f41d..bc8e43b29f 100644 --- a/dtslint/ts3.5/Tree.ts +++ b/dtslint/Tree.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/Tree' -import { pipe } from '../../src/function' +import { pipe } from '../src/function' +import * as _ from '../src/Tree' // // Do diff --git a/dtslint/constrained.ts b/dtslint/constrained.ts new file mode 100644 index 0000000000..c2e730da06 --- /dev/null +++ b/dtslint/constrained.ts @@ -0,0 +1,184 @@ +import { Alt2C, Alt3C } from '../src/Alt' +import { Alternative2C, Alternative3C } from '../src/Alternative' +import { Applicative2C, Applicative3C } from '../src/Applicative' +import { Apply2C, Apply3C } from '../src/Apply' +import { Bifunctor2C, Bifunctor3C } from '../src/Bifunctor' +import { Chain2C, Chain3C } from '../src/Chain' +import { ChainRec2C, ChainRec3C } from '../src/ChainRec' +import { Comonad2C, Comonad3C } from '../src/Comonad' +import { Compactable2C, Compactable3C } from '../src/Compactable' +import { Contravariant2C, Contravariant3C } from '../src/Contravariant' +import { Extend2C, Extend3C } from '../src/Extend' +import { Filterable2C, Filterable3C } from '../src/Filterable' +import { FilterableWithIndex2C } from '../src/FilterableWithIndex' +import { Foldable2C, Foldable3C } from '../src/Foldable' +import { FoldableWithIndex2C, FoldableWithIndex3C } from '../src/FoldableWithIndex' +import { FromEither2C, FromEither3C } from '../src/FromEither' +import { FromIO2C, FromIO3C } from '../src/FromIO' +import { FromTask2C, FromTask3C } from '../src/FromTask' +import { Functor2C, Functor3C } from '../src/Functor' +import { FunctorWithIndex2C, FunctorWithIndex3C } from '../src/FunctorWithIndex' +import { Invariant2C, Invariant3C } from '../src/Invariant' +import { Monad2C, Monad3C } from '../src/Monad' +import { Pointed2C, Pointed3C } from '../src/Pointed' +import { Profunctor2C, Profunctor3C } from '../src/Profunctor' +import { Traversable2C } from '../src/Traversable' +import { TraversableWithIndex2C } from '../src/TraversableWithIndex' +import { Unfoldable2C, Unfoldable3C } from '../src/Unfoldable' +import { Witherable2C } from '../src/Witherable' + +// $ExpectType string +export type _1 = Alt2C<'Either', string>['_E'] + +// $ExpectType string +export type _2 = Alt3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _3 = Alternative2C<'Either', string>['_E'] + +// $ExpectType string +export type _4 = Alternative3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _5 = Applicative2C<'Either', string>['_E'] + +// $ExpectType string +export type _6 = Applicative3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _7 = Apply2C<'Either', string>['_E'] + +// $ExpectType string +export type _8 = Apply3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _9 = Bifunctor2C<'Either', string>['_E'] + +// $ExpectType string +export type _10 = Bifunctor3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _11 = Comonad2C<'Either', string>['_E'] + +// $ExpectType string +export type _12 = Comonad3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _13 = Compactable2C<'Either', string>['_E'] + +// $ExpectType string +export type _14 = Compactable3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _15 = Contravariant2C<'Either', string>['_E'] + +// $ExpectType string +export type _16 = Contravariant3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _17 = Extend2C<'Either', string>['_E'] + +// $ExpectType string +export type _18 = Extend3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _19 = Filterable2C<'Either', string>['_E'] + +// $ExpectType string +export type _20 = Filterable3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _21 = FilterableWithIndex2C<'Either', number, string>['_E'] + +// $ExpectType string +export type _22 = Foldable2C<'Either', string>['_E'] + +// $ExpectType string +export type _23 = Foldable3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _24 = FoldableWithIndex2C<'Either', number, string>['_E'] + +// $ExpectType string +export type _25 = FoldableWithIndex3C<'ReaderEither', number, string>['_E'] + +// $ExpectType string +export type _26 = FromEither2C<'Either', string>['_E'] + +// $ExpectType string +export type _27 = FromEither3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _28 = FromIO2C<'Either', string>['_E'] + +// $ExpectType string +export type _29 = FromIO3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _30 = FromTask2C<'Either', string>['_E'] + +// $ExpectType string +export type _31 = FromTask3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _32 = Functor2C<'Either', string>['_E'] + +// $ExpectType string +export type _33 = Functor3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _34 = FunctorWithIndex2C<'Either', number, string>['_E'] + +// $ExpectType string +export type _35 = FunctorWithIndex3C<'ReaderEither', number, string>['_E'] + +// $ExpectType string +export type _36 = Invariant2C<'Either', string>['_E'] + +// $ExpectType string +export type _37 = Invariant3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _38 = Monad2C<'Either', string>['_E'] + +// $ExpectType string +export type _39 = Monad3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _40 = Pointed2C<'Either', string>['_E'] + +// $ExpectType string +export type _41 = Pointed3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _42 = Profunctor2C<'Either', string>['_E'] + +// $ExpectType string +export type _43 = Profunctor3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _44 = Traversable2C<'Either', string>['_E'] + +// $ExpectType string +export type _45 = TraversableWithIndex2C<'Either', number, string>['_E'] + +// $ExpectType string +export type _46 = Unfoldable2C<'Either', string>['_E'] + +// $ExpectType string +export type _47 = Unfoldable3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _48 = Witherable2C<'Either', string>['_E'] + +// $ExpectType string +export type _49 = Chain2C<'Either', string>['_E'] + +// $ExpectType string +export type _50 = Chain3C<'ReaderEither', string>['_E'] + +// $ExpectType string +export type _51 = ChainRec2C<'Either', string>['_E'] + +// $ExpectType string +export type _52 = ChainRec3C<'ReaderEither', string>['_E'] diff --git a/dtslint/ts3.5/function.ts b/dtslint/function.ts similarity index 89% rename from dtslint/ts3.5/function.ts rename to dtslint/function.ts index b5e6a6f79a..8206c303b8 100644 --- a/dtslint/ts3.5/function.ts +++ b/dtslint/function.ts @@ -1,5 +1,5 @@ -import * as _ from '../../src/function' -import * as RA from '../../src/ReadonlyArray' +import * as _ from '../src/function' +import * as RA from '../src/ReadonlyArray' // // flip diff --git a/dtslint/index.d.ts b/dtslint/index.d.ts index 5dc1183e8b..e69de29bb2 100644 --- a/dtslint/index.d.ts +++ b/dtslint/index.d.ts @@ -1 +0,0 @@ -// TypeScript Version: 3.5 diff --git a/dtslint/index.ts b/dtslint/index.ts new file mode 100644 index 0000000000..f67e5e89a4 --- /dev/null +++ b/dtslint/index.ts @@ -0,0 +1,18 @@ +import * as _ from '../src/HKT' +import * as T from '../src/Task' + +// issue #536 +export function testIssue536(x: _.Kind): _.Kind { + // @ts-expect-error + return x +} + +export const testURI = (ma: T.Task): _.Kind => { + // @ts-expect-error + return ma +} + +// @ts-expect-error +export type HKT1 = _.Kind<'a', string> + +export type Tuple = readonly [A, E] diff --git a/dtslint/ts3.5/pipeable.ts b/dtslint/pipeable.ts similarity index 92% rename from dtslint/ts3.5/pipeable.ts rename to dtslint/pipeable.ts index 562cef3e7d..984e9af0ac 100644 --- a/dtslint/ts3.5/pipeable.ts +++ b/dtslint/pipeable.ts @@ -1,16 +1,16 @@ -import { Chain3C } from '../../src/Chain' -import * as Eq from '../../src/Eq' -import * as O from '../../src/Option' -import * as P from '../../src/pipeable' -import * as R from '../../src/Reader' -import * as RTE from '../../src/ReaderTaskEither' -import * as RA from '../../src/ReadonlyArray' -import * as RT from '../../src/ReadonlyTuple' -import * as SRTE from '../../src/StateReaderTaskEither' -import * as S from '../../src/string' -import * as T from '../../src/Task' -import * as TE from '../../src/TaskEither' -import * as TH from '../../src/These' +import { Chain3C } from '../src/Chain' +import * as Eq from '../src/Eq' +import * as O from '../src/Option' +import * as P from '../src/pipeable' +import * as R from '../src/Reader' +import * as RTE from '../src/ReaderTaskEither' +import * as RA from '../src/ReadonlyArray' +import * as RT from '../src/ReadonlyTuple' +import * as SRTE from '../src/StateReaderTaskEither' +import * as S from '../src/string' +import * as T from '../src/Task' +import * as TE from '../src/TaskEither' +import * as TH from '../src/These' const TEApplicative = TE.getApplicativeTaskValidation(T.ApplyPar, S.Semigroup) const TEAlt = TE.getAltTaskValidation(S.Semigroup) diff --git a/dtslint/ts3.5/constrained.ts b/dtslint/ts3.5/constrained.ts deleted file mode 100644 index d0d003d71e..0000000000 --- a/dtslint/ts3.5/constrained.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { Alt2C, Alt3C } from '../../src/Alt' -import { Alternative2C, Alternative3C } from '../../src/Alternative' -import { Applicative2C, Applicative3C } from '../../src/Applicative' -import { Apply2C, Apply3C } from '../../src/Apply' -import { Bifunctor2C, Bifunctor3C } from '../../src/Bifunctor' -import { Chain2C, Chain3C } from '../../src/Chain' -import { ChainRec2C, ChainRec3C } from '../../src/ChainRec' -import { Comonad2C, Comonad3C } from '../../src/Comonad' -import { Compactable2C, Compactable3C } from '../../src/Compactable' -import { Contravariant2C, Contravariant3C } from '../../src/Contravariant' -import { Extend2C, Extend3C } from '../../src/Extend' -import { Filterable2C, Filterable3C } from '../../src/Filterable' -import { FilterableWithIndex2C } from '../../src/FilterableWithIndex' -import { Foldable2C, Foldable3C } from '../../src/Foldable' -import { FoldableWithIndex2C, FoldableWithIndex3C } from '../../src/FoldableWithIndex' -import { FromEither2C, FromEither3C } from '../../src/FromEither' -import { FromIO2C, FromIO3C } from '../../src/FromIO' -import { FromTask2C, FromTask3C } from '../../src/FromTask' -import { Functor2C, Functor3C } from '../../src/Functor' -import { FunctorWithIndex2C, FunctorWithIndex3C } from '../../src/FunctorWithIndex' -import { Invariant2C, Invariant3C } from '../../src/Invariant' -import { Monad2C, Monad3C } from '../../src/Monad' -import { Pointed2C, Pointed3C } from '../../src/Pointed' -import { Profunctor2C, Profunctor3C } from '../../src/Profunctor' -import { Traversable2C } from '../../src/Traversable' -import { TraversableWithIndex2C } from '../../src/TraversableWithIndex' -import { Unfoldable2C, Unfoldable3C } from '../../src/Unfoldable' -import { Witherable2C } from '../../src/Witherable' - -// $ExpectType string -type _1 = Alt2C<'Either', string>['_E'] - -// $ExpectType string -type _2 = Alt3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _3 = Alternative2C<'Either', string>['_E'] - -// $ExpectType string -type _4 = Alternative3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _5 = Applicative2C<'Either', string>['_E'] - -// $ExpectType string -type _6 = Applicative3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _7 = Apply2C<'Either', string>['_E'] - -// $ExpectType string -type _8 = Apply3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _9 = Bifunctor2C<'Either', string>['_E'] - -// $ExpectType string -type _10 = Bifunctor3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _11 = Comonad2C<'Either', string>['_E'] - -// $ExpectType string -type _12 = Comonad3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _13 = Compactable2C<'Either', string>['_E'] - -// $ExpectType string -type _14 = Compactable3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _15 = Contravariant2C<'Either', string>['_E'] - -// $ExpectType string -type _16 = Contravariant3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _17 = Extend2C<'Either', string>['_E'] - -// $ExpectType string -type _18 = Extend3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _19 = Filterable2C<'Either', string>['_E'] - -// $ExpectType string -type _20 = Filterable3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _21 = FilterableWithIndex2C<'Either', number, string>['_E'] - -// $ExpectType string -type _22 = Foldable2C<'Either', string>['_E'] - -// $ExpectType string -type _23 = Foldable3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _24 = FoldableWithIndex2C<'Either', number, string>['_E'] - -// $ExpectType string -type _25 = FoldableWithIndex3C<'ReaderEither', number, string>['_E'] - -// $ExpectType string -type _26 = FromEither2C<'Either', string>['_E'] - -// $ExpectType string -type _27 = FromEither3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _28 = FromIO2C<'Either', string>['_E'] - -// $ExpectType string -type _29 = FromIO3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _30 = FromTask2C<'Either', string>['_E'] - -// $ExpectType string -type _31 = FromTask3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _32 = Functor2C<'Either', string>['_E'] - -// $ExpectType string -type _33 = Functor3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _34 = FunctorWithIndex2C<'Either', number, string>['_E'] - -// $ExpectType string -type _35 = FunctorWithIndex3C<'ReaderEither', number, string>['_E'] - -// $ExpectType string -type _36 = Invariant2C<'Either', string>['_E'] - -// $ExpectType string -type _37 = Invariant3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _38 = Monad2C<'Either', string>['_E'] - -// $ExpectType string -type _39 = Monad3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _40 = Pointed2C<'Either', string>['_E'] - -// $ExpectType string -type _41 = Pointed3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _42 = Profunctor2C<'Either', string>['_E'] - -// $ExpectType string -type _43 = Profunctor3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _44 = Traversable2C<'Either', string>['_E'] - -// $ExpectType string -type _45 = TraversableWithIndex2C<'Either', number, string>['_E'] - -// $ExpectType string -type _46 = Unfoldable2C<'Either', string>['_E'] - -// $ExpectType string -type _47 = Unfoldable3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _48 = Witherable2C<'Either', string>['_E'] - -// $ExpectType string -type _49 = Chain2C<'Either', string>['_E'] - -// $ExpectType string -type _50 = Chain3C<'ReaderEither', string>['_E'] - -// $ExpectType string -type _51 = ChainRec2C<'Either', string>['_E'] - -// $ExpectType string -type _52 = ChainRec3C<'ReaderEither', string>['_E'] diff --git a/dtslint/ts3.5/index.d.ts b/dtslint/ts3.5/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/dtslint/ts3.5/index.ts b/dtslint/ts3.5/index.ts deleted file mode 100644 index 0a8e577031..0000000000 --- a/dtslint/ts3.5/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as _ from '../../src/HKT' -import * as T from '../../src/Task' - -// issue #536 -function testIssue536(x: _.Kind): _.Kind { - // $ExpectError - return x -} - -const testURI = (ma: T.Task): _.Kind => { - // $ExpectError - return ma -} - -// $ExpectError -type HKT1 = _.Kind<'a', string> - -type Tuple = readonly [A, E] diff --git a/dtslint/ts3.5/tsconfig.json b/dtslint/ts3.5/tsconfig.json deleted file mode 100644 index eacfc12b9b..0000000000 --- a/dtslint/ts3.5/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "strict": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "noImplicitReturns": false, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noFallthroughCasesInSwitch": true, - "target": "es5", - "lib": ["es2015"], - "skipLibCheck": true - }, - "exclude": ["../../node_modules"] -} diff --git a/dtslint/ts3.5/tslint.json b/dtslint/ts3.5/tslint.json deleted file mode 100644 index 2df6c5208a..0000000000 --- a/dtslint/ts3.5/tslint.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "dtslint/dtslint.json", - "rules": { - "semicolon": false, - "array-type": false, - "no-unnecessary-generics": false, - "member-access": false, - "no-empty-interface": false, - "no-arg": false, - "no-object-literal-type-assertion": false, - "no-unnecessary-class": false, - "radix": false, - "no-angle-bracket-type-assertion": false, - "object-literal-shorthand": false, - "prefer-object-spread": false, - "whitespace": false, - "use-default-type-parameter": false, - "no-relative-import-in-test": false, - "no-null-undefined-union": false, - "invalid-void": false, - "max-line-length": false - } -} diff --git a/dtslint/tsconfig.json b/dtslint/tsconfig.json new file mode 100644 index 0000000000..4c6e65fd5c --- /dev/null +++ b/dtslint/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "include": ["."], + "compilerOptions": { + "incremental": false, + "composite": false, + "noUnusedLocals": false + } +} diff --git a/package-lock.json b/package-lock.json index f451744b94..014766ca6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "2.16.7", "license": "MIT", "devDependencies": { + "@effect/dtslint": "^0.1.0", "@effect/language-service": "^0.0.19", "@types/benchmark": "^1.0.31", "@types/chai": "^3.5.2", @@ -19,7 +20,6 @@ "@vitest/coverage-istanbul": "^1.6.0", "benchmark": "2.1.4", "docs-ts": "^0.8.0", - "dtslint": "github:gcanti/dtslint", "eslint": "^8.38.0", "eslint-plugin-deprecation": "^1.4.1", "eslint-plugin-import": "^2.27.5", @@ -393,6 +393,74 @@ "node": ">=0.10.0" } }, + "node_modules/@effect/dtslint": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@effect/dtslint/-/dtslint-0.1.0.tgz", + "integrity": "sha512-PNdoBeyA7v+LRhri+3GF0bXzya4v+skh8euiYKLLxDxJ/ymryn9y1XBJBdPYzvYFmatELNWCBlas/ZZ7AbCQVg==", + "dev": true, + "dependencies": { + "fs-extra": "11.1.1", + "tslint": "6.1.3" + }, + "bin": { + "dtslint": "index.js" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/@effect/dtslint/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/@effect/dtslint/node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/@effect/dtslint/node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, "node_modules/@effect/language-service": { "version": "0.0.19", "resolved": "https://registry.npmjs.org/@effect/language-service/-/language-service-0.0.19.tgz", @@ -2486,89 +2554,6 @@ "node": ">=6.0.0" } }, - "node_modules/dtslint": { - "version": "0.4.4", - "resolved": "git+ssh://git@github.com/gcanti/dtslint.git#1558adbeda424fec83a8d314784c18728a970cd4", - "dev": true, - "license": "MIT", - "dependencies": { - "fs-extra": "^6.0.1", - "parsimmon": "^1.12.0", - "strip-json-comments": "^2.0.1", - "tslint": "^5.12.0", - "typescript": "^4.6.2" - }, - "bin": { - "dtslint": "bin/index.js" - }, - "engines": { - "node": ">=6.10.0" - } - }, - "node_modules/dtslint/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dtslint/node_modules/tslint": { - "version": "5.20.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", - "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - }, - "bin": { - "tslint": "bin/tslint" - }, - "engines": { - "node": ">=4.8.0" - }, - "peerDependencies": { - "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" - } - }, - "node_modules/dtslint/node_modules/tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" - } - }, - "node_modules/dtslint/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/electron-to-chromium": { "version": "1.4.818", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz", @@ -3533,14 +3518,38 @@ "dev": true }, "node_modules/fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-extra/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" } }, "node_modules/fs.realpath": { @@ -4864,10 +4873,13 @@ } }, "node_modules/mkdirp/node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/mlly": { "version": "1.7.1", @@ -5189,12 +5201,6 @@ "node": ">=6" } }, - "node_modules/parsimmon": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.18.1.tgz", - "integrity": "sha512-u7p959wLfGAhJpSDJVYXoyMCXWYwHia78HhRBWqk7AIbxdmlrfdp5wX0l3xv/iTSH5HvhN9K7o26hwwpgS5Nmw==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5856,15 +5862,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-literal": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", @@ -6095,9 +6092,9 @@ } }, "node_modules/tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tslint": { @@ -6855,6 +6852,54 @@ "is-negated-glob": "^1.0.0" } }, + "@effect/dtslint": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@effect/dtslint/-/dtslint-0.1.0.tgz", + "integrity": "sha512-PNdoBeyA7v+LRhri+3GF0bXzya4v+skh8euiYKLLxDxJ/ymryn9y1XBJBdPYzvYFmatELNWCBlas/ZZ7AbCQVg==", + "dev": true, + "requires": { + "fs-extra": "11.1.1", + "tslint": "6.1.3" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, "@effect/language-service": { "version": "0.0.19", "resolved": "https://registry.npmjs.org/@effect/language-service/-/language-service-0.0.19.tgz", @@ -8237,62 +8282,6 @@ "esutils": "^2.0.2" } }, - "dtslint": { - "version": "git+ssh://git@github.com/gcanti/dtslint.git#1558adbeda424fec83a8d314784c18728a970cd4", - "dev": true, - "from": "dtslint@github:gcanti/dtslint", - "requires": { - "fs-extra": "^6.0.1", - "parsimmon": "^1.12.0", - "strip-json-comments": "^2.0.1", - "tslint": "^5.12.0", - "typescript": "^4.6.2" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "tslint": { - "version": "5.20.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", - "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - } - } - }, "electron-to-chromium": { "version": "1.4.818", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz", @@ -9039,14 +9028,32 @@ "dev": true }, "fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "dependencies": { + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + } } }, "fs.realpath": { @@ -10028,9 +10035,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true } } @@ -10271,12 +10278,6 @@ "callsites": "^3.0.0" } }, - "parsimmon": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.18.1.tgz", - "integrity": "sha512-u7p959wLfGAhJpSDJVYXoyMCXWYwHia78HhRBWqk7AIbxdmlrfdp5wX0l3xv/iTSH5HvhN9K7o26hwwpgS5Nmw==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -10739,12 +10740,6 @@ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "strip-literal": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", @@ -10932,9 +10927,9 @@ } }, "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tslint": { diff --git a/package.json b/package.json index 557013d79a..67a6ddf3cd 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "homepage": "https://github.com/gcanti/fp-ts", "devDependencies": { + "@effect/dtslint": "^0.1.0", "@effect/language-service": "^0.0.19", "@types/benchmark": "^1.0.31", "@types/chai": "^3.5.2", @@ -47,7 +48,6 @@ "@vitest/coverage-istanbul": "^1.6.0", "benchmark": "2.1.4", "docs-ts": "^0.8.0", - "dtslint": "github:gcanti/dtslint", "eslint": "^8.38.0", "eslint-plugin-deprecation": "^1.4.1", "eslint-plugin-import": "^2.27.5",