Skip to content

Instantly share code, notes, and snippets.

@kanian
Created February 6, 2020 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanian/3e8a9d88e078571f8718028d2fc9c9b8 to your computer and use it in GitHub Desktop.
Save kanian/3e8a9d88e078571f8718028d2fc9c9b8 to your computer and use it in GitHub Desktop.
All the schema decorators on a class
@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