Skip to content

feature: enum created for fixed options #12

@Anmol1696

Description

@Anmol1696

Overview

Currently when we create the index.ts file, enums are hardcoded into type defination itself.

Example:

export interface IngressPortStatus {
  error?: string;
  port: number;
  protocol: "SCTP" | "TCP" | "UDP";
}

Here protocol is an enum that should be a type of its own, so that it is easy to process and codeup when using this type definaiton.

Implementation

export type EnumIngressPortStatusProtocol = "SCTP" | "TCP" | "UDP"; 

export interface IngressPortStatus {
  error?: string;
  port: number;
  protocol: EnumIngressPortStatusProtocol;
}

Note

Look into how to telescope handles enums and types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions