Created
February 6, 2020 15:32
-
-
Save kanian/3e8a9d88e078571f8718028d2fc9c9b8 to your computer and use it in GitHub Desktop.
All the schema decorators on a class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@schema(personSchema, true) | |
class Person { | |
@propertySchema(personAgeSchema) | |
age: number | |
@propertySchema(personNameSchema) | |
name: string | |
constructor( | |
@paramSchema(personNameSchema) name: string, | |
@paramSchema(personAgeSchema) age: number | |
) { | |
this.age = age | |
this.name = name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment