@Alias

Sometimes the front-end and back-end don’t agree on what a property should be called, that’s no problem thanks to this decorator! import { BuildableResource, Properties } from "tapi.js"; @Properties.Resource class TestClass extends BuildableResource { @Properties.Alias("incomingPropertyName") public myProperty: string; }

@Ignore

Not all of your class properties need to be mappable, some can be ignored. This is where this decorator comes in handy! import { BuildableResource, Properties } from "tapi.js"; @Properties.Resource class TestClass extends BuildableResource { @Properties.Ignore public thingToBeIgnored: string; }

@ListOf

If the incoming object has a list that needs to be converted to a typed one we need to indicate the class of the individual items. Remember: The class of the list items must be a BuildableResource. import { BuildableResource, Properties } from "tapi.js"; import Post from "path/to/classes/Post"; @Properties.Resource class TestClass extends BuildableResource { @Properties.ListOf(Post) public listOfPosts: Post[]; }

@Resource

This is what checks if your class satisfies the requirements needed to be buildable. It is completely optional but highly recommended. import { BuildableResource, Properties } from "tapi.js"; @Properties.Resource class TestClass extends BuildableResource { // ... }

@Transform

Sometimes, assigning the value as it arrives is not enough. What if we want to apply a transformation before it gets assigned? Simple! import { BuildableResource, Properties } from "tapi.js"; @Properties.Resource class TestClass extends BuildableResource { @Properties.Transform(incomingValue => { return incomingValue.toUpperCase(); }) public needsToBeUppercase: string; }