20231230.0.0 (#6)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Fixes subtraiting Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/thilatrait/pulls/6
This commit was merged in pull request #6.
This commit is contained in:
12
src/tests.ts
12
src/tests.ts
@@ -1,4 +1,4 @@
|
||||
import { expresses, trait } from "."
|
||||
import { expresses, extendsAndExpresses, trait } from "."
|
||||
|
||||
|
||||
const Identifiable = <ID>() =>
|
||||
@@ -21,8 +21,16 @@ const Identifiable = <ID>() =>
|
||||
|
||||
const ImplementsIdentifiable = <ID>(defaultID: ID) =>
|
||||
trait(Parent => {
|
||||
abstract class ImplementsIdentifiable extends Identifiable<ID>()(Parent) {
|
||||
abstract class ImplementsIdentifiable extends extendsAndExpresses(
|
||||
Parent,
|
||||
[Identifiable<ID>()],
|
||||
) {
|
||||
id: ID = defaultID
|
||||
|
||||
constructor(...args: any[]) {
|
||||
super(...args)
|
||||
console.log("ImplementsIdentifiable constructor")
|
||||
}
|
||||
}
|
||||
|
||||
return ImplementsIdentifiable
|
||||
|
||||
Reference in New Issue
Block a user