@typed-f/functor
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -6,2 +6,11 @@ # Change Log | ||
<a name="0.2.0"></a> | ||
# [0.2.0](https://github.com/Ailrun/typed-f/compare/v0.1.0...v0.2.0) (2018-08-22) | ||
**Note:** Version bump only for package @typed-f/functor | ||
<a name="0.1.0"></a> | ||
@@ -8,0 +17,0 @@ # [0.1.0](https://github.com/Ailrun/typed-f/compare/v0.0.1...v0.1.0) (2018-08-14) |
{ | ||
"name": "@typed-f/functor", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"keywords": [ | ||
@@ -26,10 +26,16 @@ "Functor", | ||
"build": "tsc -p ./tsconfig.json", | ||
"watch": "tsc -w -p ./tsconfig.json" | ||
"watch": "tsc -w -p ./tsconfig.json", | ||
"test:lint": "tslint -p ." | ||
}, | ||
"dependencies": { | ||
"@typed-f/function": "^0.1.0", | ||
"@typed-f/tagged": "^0.1.0" | ||
"@typed-f/function": "^0.2.0", | ||
"@typed-f/tagged": "^0.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^23.3.1", | ||
"@types/node": "^10.7.0", | ||
"jest": "^23.5.0", | ||
"rimraf": "^2.6.2", | ||
"ts-jest": "^23.1.3", | ||
"tslint": "^5.11.0", | ||
"typescript": "^3.0.1" | ||
@@ -40,3 +46,3 @@ }, | ||
}, | ||
"gitHead": "a1925ab6cb01347972f566478cc9c0fc289c2e31" | ||
"gitHead": "4e8bd2dfff44251ab307a094001a3377843a44cf" | ||
} |
@@ -0,1 +1,4 @@ | ||
/* | ||
* Copyright 2018-present Junyoung Clare Jang | ||
*/ | ||
import { Fun } from '@typed-f/function'; | ||
@@ -28,2 +31,3 @@ import * as T from '@typed-f/tagged'; | ||
) => T.Tag3List<A0, A1, R>[Tag]; | ||
//tslint:disable-next-line: max-line-length | ||
type F4M<Tag extends keyof T.Tag4List<any, any, any, any>, A0, A1, A2, A3> = <R>( | ||
@@ -33,10 +37,18 @@ f: Fun<[A3], R>, | ||
export interface Functor1<Tag extends keyof T.Tag1List<any>, A0> extends T.Tagged<Tag>, FB<F1M<Tag, A0>> {} | ||
export interface Functor2<Tag extends keyof T.Tag2List<any, any>, A0, A1> extends T.Tagged<Tag>, FB<F2M<Tag, A0, A1>> {} | ||
export interface Functor3<Tag extends keyof T.Tag3List<any, any, any>, A0, A1, A2> extends T.Tagged<Tag>, FB<F3M<Tag, A0, A1, A2>> {} | ||
export interface Functor4<Tag extends keyof T.Tag4List<any, any, any, any>, A0, A1, A2, A3> extends T.Tagged<Tag>, FB<F4M<Tag, A0, A1, A2, A3>> {} | ||
export interface Functor1<Tag extends keyof T.Tag1List<any>, A0> | ||
extends T.Tagged<Tag>, FB<F1M<Tag, A0>> {} | ||
export interface Functor2<Tag extends keyof T.Tag2List<any, any>, A0, A1> | ||
extends T.Tagged<Tag>, FB<F2M<Tag, A0, A1>> {} | ||
//tslint:disable-next-line: max-line-length | ||
export interface Functor3<Tag extends keyof T.Tag3List<any, any, any>, A0, A1, A2> | ||
extends T.Tagged<Tag>, FB<F3M<Tag, A0, A1, A2>> {} | ||
//tslint:disable-next-line: max-line-length | ||
export interface Functor4<Tag extends keyof T.Tag4List<any, any, any, any>, A0, A1, A2, A3> | ||
extends T.Tagged<Tag>, FB<F4M<Tag, A0, A1, A2, A3>> {} | ||
export namespace Functor { | ||
export function map<T, U>(f: Fun<[T], U>): <Tag extends keyof T.Tag1List<any>>( | ||
wa: Functor1<Tag, T>, | ||
export function map<V, U>( | ||
f: Fun<[V], U>, | ||
): <Tag extends keyof T.Tag1List<any>>( | ||
wa: Functor1<Tag, V>, | ||
) => T.Tag1List<U>[Tag] { | ||
@@ -48,5 +60,6 @@ return function (wa) { | ||
//tslint:disable-next-line: max-line-length | ||
throw new Error('Parameter is not a functor. You cannot call the function map with non-functor.'); | ||
} | ||
}; | ||
} | ||
} |
@@ -0,1 +1,4 @@ | ||
/* | ||
* Copyright 2018-present Junyoung Clare Jang | ||
*/ | ||
export * from './Functor'; |
@@ -6,3 +6,6 @@ { | ||
"outDir": "./dist" | ||
} | ||
}, | ||
"include": [ | ||
"./src" | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7745
12
129
7
+ Added@typed-f/function@0.2.2(transitive)
+ Added@typed-f/tagged@0.2.2(transitive)
- Removed@typed-f/function@0.1.0(transitive)
- Removed@typed-f/tagged@0.1.0(transitive)
Updated@typed-f/function@^0.2.0
Updated@typed-f/tagged@^0.2.0