Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anthonygualandri/33a4c58f39cf5a4086e62997d0062d76 to your computer and use it in GitHub Desktop.
Save anthonygualandri/33a4c58f39cf5a4086e62997d0062d76 to your computer and use it in GitHub Desktop.
Custom Type Array of Objects
import { DefineType, Schema } from "deno-slack-sdk/mod.ts";
export const PaystubsRecordType = DefineType({
title: "Paystubs Record Info",
description: "Information about each paystubs records",
name: "paystubs_info",
type: Schema.types.object,
properties: {
flexibleObject: {
type: Schema.types.object,
}
/*start_unix: { type: Schema.types.string },
end_unix: { type: Schema.types.string },
staff_email: { type: Schema.types.string },*/
},
required: [], // "start_unix", "end_unix", "staff_email"
});
export const PaystubsArray = DefineType({
name: "PaystubsArray",
type: Schema.types.array,
items: {
type: PaystubsRecordType
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment