Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/traitify-ts/pulls/8
This commit was merged in pull request #8.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thilawyn/traitify-ts",
|
"name": "@thilawyn/traitify-ts",
|
||||||
"version": "0.1.7",
|
"version": "0.1.8",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://git.jvalver.de/api/packages/thilawyn/npm/"
|
"registry": "https://git.jvalver.de/api/packages/thilawyn/npm/"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export class TraitExpression<
|
|||||||
) as any
|
) as any
|
||||||
}
|
}
|
||||||
|
|
||||||
implementsStatic(target: ImplementsStatic<typeof this>, context: any) {}
|
staticImplements(target: StaticImplements<typeof this>, context: any) {}
|
||||||
|
|
||||||
subtrait<
|
subtrait<
|
||||||
This extends TraitExpression<typeof TraitExpression.NullSuperclass, any>
|
This extends TraitExpression<typeof TraitExpression.NullSuperclass, any>
|
||||||
@@ -106,7 +106,7 @@ export type Implements<
|
|||||||
>
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
export type ImplementsStatic<
|
export type StaticImplements<
|
||||||
Exp extends TraitExpression<any, Trait<any, any, any, any>[]>
|
Exp extends TraitExpression<any, Trait<any, any, any, any>[]>
|
||||||
> = (
|
> = (
|
||||||
Simplify<
|
Simplify<
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export { Trait, TraitClass, TraitConcreteClass, TraitInstance, TraitStaticMembers, TraitTuple } from "./Trait"
|
export { Trait, TraitClass, TraitConcreteClass, TraitInstance, TraitStaticMembers, TraitTuple } from "./Trait"
|
||||||
export { TraitBuilder, trait } from "./TraitBuilder"
|
export { TraitBuilder, trait } from "./TraitBuilder"
|
||||||
export { Implements, ImplementsStatic, TraitExpression, TraitExpressionClass, TraitExpressionConcreteClass, TraitExpressionInstance, TraitExpressionStaticMembers } from "./TraitExpression"
|
export { Implements, StaticImplements, TraitExpression, TraitExpressionClass, TraitExpressionConcreteClass, TraitExpressionInstance, TraitExpressionStaticMembers } from "./TraitExpression"
|
||||||
export { TraitExpressionBuilder, expression } from "./TraitExpressionBuilder"
|
export { TraitExpressionBuilder, expression } from "./TraitExpressionBuilder"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { TraitClass } from "./Trait"
|
import { TraitClass } from "./Trait"
|
||||||
import { trait } from "./TraitBuilder"
|
import { trait } from "./TraitBuilder"
|
||||||
import { Implements, ImplementsStatic, TraitExpressionClass } from "./TraitExpression"
|
import { Implements, StaticImplements, TraitExpressionClass } from "./TraitExpression"
|
||||||
import { expression } from "./TraitExpressionBuilder"
|
import { expression } from "./TraitExpressionBuilder"
|
||||||
|
|
||||||
|
|
||||||
@@ -69,10 +69,10 @@ const exp = expression
|
|||||||
.build()
|
.build()
|
||||||
|
|
||||||
type Abs = Implements<typeof exp>
|
type Abs = Implements<typeof exp>
|
||||||
type AbsStatic = ImplementsStatic<typeof exp>
|
type AbsStatic = StaticImplements<typeof exp>
|
||||||
type ExpClass = TraitExpressionClass<typeof exp>
|
type ExpClass = TraitExpressionClass<typeof exp>
|
||||||
|
|
||||||
@exp.implementsStatic
|
@exp.staticImplements
|
||||||
class User extends exp.extends implements Implements<typeof exp> {
|
class User extends exp.extends implements Implements<typeof exp> {
|
||||||
readonly isStatefulSubscription: true = true
|
readonly isStatefulSubscription: true = true
|
||||||
readonly isActiveStatefulSubscription: true = true
|
readonly isActiveStatefulSubscription: true = true
|
||||||
|
|||||||
Reference in New Issue
Block a user