Skip to content

Suggestion: More granular string typing #47

Open
@bfaulk96

Description

@bfaulk96

Admittedly, I'm not sure what version of Typescript this supports, or how the types definitions are created, but with Typescript allowing template strings, would it be possible to implement something along the lines of

type ServiceProvider = 'AWS' | string;
type ServiceName = string; // Or the entire service name list
type DataTypeName = string; // Or the entire data type name list
type AWSResourceType = `${ServiceProvider}::${ServiceName}::${DataTypeName}`

(Based on the docs here)

This would further help avoid pesky typos of things like AWS::SQS:Queue and similar problems.
Just exploring ideas, feel free to close if it's not something that could be considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions