diff --git a/.vscode/settings.json b/.vscode/settings.json index 1ac79ad19..21c5c7441 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "eslint.validate": ["typescript"], "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "files.insertFinalNewline": true } diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b4dea4a..4ab28d5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice. +# 2.16.4 + +**Polish** + +Fix `__PURE__` annotation placement, closes #1926 + # 2.16.3 **Polish** diff --git a/package.json b/package.json index d69dbb4f6..b2473de22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fp-ts", - "version": "2.16.3", + "version": "2.16.4", "description": "Functional programming in TypeScript", "main": "./lib/index.js", "module": "./es6/index.js", diff --git a/src/IOEither.ts b/src/IOEither.ts index f42c6a0ff..f37881919 100644 --- a/src/IOEither.ts +++ b/src/IOEither.ts @@ -840,8 +840,7 @@ export const chainOptionK: ( */ export const chainOptionKW: ( onNone: LazyArg -) => (f: (a: A) => Option) => (ma: IOEither) => IOEither = - /*#__PURE__*/ chainOptionK as any +) => (f: (a: A) => Option) => (ma: IOEither) => IOEither = chainOptionK as any /** @internal */ interface IOEitherTypeLambda extends _.TypeLambda { diff --git a/src/ReaderEither.ts b/src/ReaderEither.ts index c495311ad..08e7684d6 100644 --- a/src/ReaderEither.ts +++ b/src/ReaderEither.ts @@ -861,7 +861,7 @@ export const chainOptionK: ( export const chainOptionKW: ( onNone: LazyArg ) => (f: (a: A) => Option) => (ma: ReaderEither) => ReaderEither = - /*#__PURE__*/ chainOptionK as any + chainOptionK as any /** @internal */ interface ReaderEitherTypeLambda extends _.TypeLambda { diff --git a/src/ReaderIO.ts b/src/ReaderIO.ts index 1e0ab45fd..9610c757f 100644 --- a/src/ReaderIO.ts +++ b/src/ReaderIO.ts @@ -48,7 +48,7 @@ export const fromReader: (fa: Reader) => ReaderIO = /*#__PURE_ * @category conversions * @since 2.13.0 */ -export const fromIO: (fa: IO) => ReaderIO = /*#__PURE__*/ R.of +export const fromIO: (fa: IO) => ReaderIO = R.of // ------------------------------------------------------------------------------------- // combinators diff --git a/src/ReaderTask.ts b/src/ReaderTask.ts index 0fab18fc9..7b7fe25b9 100644 --- a/src/ReaderTask.ts +++ b/src/ReaderTask.ts @@ -64,7 +64,7 @@ export const fromReader: (fa: R.Reader) => ReaderTask = /*#__P * @category conversions * @since 2.3.0 */ -export const fromTask: (fa: Task) => ReaderTask = /*#__PURE__*/ R.of +export const fromTask: (fa: Task) => ReaderTask = R.of /** * @category conversions diff --git a/src/ReaderTaskEither.ts b/src/ReaderTaskEither.ts index 3d3d76800..c6f092a0c 100644 --- a/src/ReaderTaskEither.ts +++ b/src/ReaderTaskEither.ts @@ -175,17 +175,15 @@ export const leftIO: (me: IO) => ReaderTaskEither(ma: ReaderIO) => ReaderTaskEither = /*#__PURE__*/ ( - ma -) => flow(ma, TE.rightIO) +export const rightReaderIO: (ma: ReaderIO) => ReaderTaskEither = (ma) => + flow(ma, TE.rightIO) /** * @category constructors * @since 2.13.0 */ -export const leftReaderIO: (me: ReaderIO) => ReaderTaskEither = /*#__PURE__*/ ( - me -) => flow(me, TE.leftIO) +export const leftReaderIO: (me: ReaderIO) => ReaderTaskEither = (me) => + flow(me, TE.leftIO) // ------------------------------------------------------------------------------------- // conversions @@ -1381,7 +1379,7 @@ export const chainOptionK: ( export const chainOptionKW: ( onNone: LazyArg ) => (f: (a: A) => Option) => (ma: ReaderTaskEither) => ReaderTaskEither = - /*#__PURE__*/ chainOptionK as any + chainOptionK as any /** @internal */ interface ReaderTaskEitherTypeLambda extends _.TypeLambda { diff --git a/src/StateReaderTaskEither.ts b/src/StateReaderTaskEither.ts index 303af902a..6c6c5feff 100644 --- a/src/StateReaderTaskEither.ts +++ b/src/StateReaderTaskEither.ts @@ -1149,8 +1149,7 @@ export const chainOptionKW: ( onNone: LazyArg ) => ( f: (a: A) => Option -) => (ma: StateReaderTaskEither) => StateReaderTaskEither = - /*#__PURE__*/ chainOptionK as any +) => (ma: StateReaderTaskEither) => StateReaderTaskEither = chainOptionK as any /** * Alias of `flatMapEither`. diff --git a/src/TaskEither.ts b/src/TaskEither.ts index e17a1a3d7..28235f17f 100644 --- a/src/TaskEither.ts +++ b/src/TaskEither.ts @@ -1149,8 +1149,7 @@ export const chainOptionK: ( */ export const chainOptionKW: ( onNone: LazyArg -) => (f: (a: A) => Option) => (ma: TaskEither) => TaskEither = - /*#__PURE__*/ chainOptionK as any +) => (f: (a: A) => Option) => (ma: TaskEither) => TaskEither = chainOptionK as any /** @internal */ interface TaskEitherTypeLambda extends _.TypeLambda { diff --git a/src/TaskThese.ts b/src/TaskThese.ts index 1d61e9475..3a700af13 100644 --- a/src/TaskThese.ts +++ b/src/TaskThese.ts @@ -114,7 +114,7 @@ export const fromIO: (fa: IO) => TaskThese = rightIO * @category conversions * @since 2.4.0 */ -export const fromIOEither: (fa: IOEither) => TaskThese = /*#__PURE__*/ T.fromIO +export const fromIOEither: (fa: IOEither) => TaskThese = T.fromIO /** * @category conversions