Skip to content

Commit

Permalink
fix(interfaces): add readonly to interface members for Alt and Plus
Browse files Browse the repository at this point in the history
BREAKING CHANGE: In 5.2.0, Alt had an interface which didn't make alt readonly. It is now readonly.
  • Loading branch information
williamareynolds committed Jan 6, 2020
1 parent bee420e commit 801d1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Alt.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Type, URIs } from './HKT'

export interface Alt1<F extends URIs, A> {
alt: (fa: Type<F, A>) => Type<F, A>
readonly alt: (fa: Type<F, A>) => Type<F, A>
}

export interface AltS1<F extends URIs> {
alt: <A>(f2: Type<F, A>, f1: Type<F, A>) => Type<F, A>
readonly alt: <A>(f2: Type<F, A>, f1: Type<F, A>) => Type<F, A>
}
4 changes: 2 additions & 2 deletions src/Plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Type, URIs } from './HKT'
import { Alt1, AltS1 } from './Alt'

export interface Plus1<F extends URIs, A> extends Alt1<F, A> {
zero: () => Type<F, A>
readonly zero: () => Type<F, A>
}

export interface PlusS1<F extends URIs> extends AltS1<F> {
zero: <A>(fa: Type<F, A>) => Type<F, A>
readonly zero: <A>(fa: Type<F, A>) => Type<F, A>
}

0 comments on commit 801d1eb

Please sign in to comment.