Skip to main content
Module

x/slack_bolt/src/types/helpers.ts

TypeScript framework to build Slack apps in a flash with the latest platform features. Deno port of @slack/bolt
Latest
File
// deno-lint-ignore-file no-explicit-any/** * Extend this interface to build a type that is treated as an open set of properties, where each key is a string. */export type StringIndexed = Record<string, any>
/** * Type function which removes the index signature for the type `T` */export type KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : K} extends { [_ in keyof T]: infer U } ? U : never
/** * Type function which allows either types `T` or `U`, but not both. */export type XOR<T, U> = T | U extends Record<string, unknown> ? (Without<T, U> & U) | (Without<U, T> & T) : T | Utype Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never }