Skip to content

Commit

Permalink
fix(types): reverts ForcedSubject<T> to be an interface
Browse files Browse the repository at this point in the history
`protected` keyword adds a bit more complexity when dealing with type transformations (e.g., `Partial<T>`)
  • Loading branch information
stalniy committed Dec 29, 2020
1 parent 633009a commit f48b0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/casl-ability/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export type InferSubjects<T, IncludeTagName extends boolean = false> =
: TagName<T>
);

export declare abstract class ForcedSubject<T> {
protected readonly __caslSubjectType__: T;
export interface ForcedSubject<T> {
readonly __caslSubjectType__: T;
}

export type TaggedInterface<T extends string> = ForcedSubject<T> |
Expand Down

0 comments on commit f48b0a0

Please sign in to comment.