Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
/ cfntypes Public archive

Automatically generated type definitions for CloudFormation, kept up-to-date by an automated build

Notifications You must be signed in to change notification settings

futurematik/cfntypes

Repository files navigation

@fmtk/cfntypes

Typescript types for AWS CloudFormation types.

Specification Version

The specification version is available via the ResourceSpecificationVersion export and via awsResourceSpecificationVersion in package.json.

import { ResourceSpecificationVersion } from '@fmtk/cfntypes';

console.log(`using version ${ResourceSpecificationVersion}`);

Resource Types

The resource types are all defined individually as interfaces with predictable names, and also as properties of the ResourceTypes interface keyed by the CloudFormation resource type.

import { ResourceTypes, ResourceType } from '@fmtk/cfntypes';

type ApiGatewayProps = ResourceTypes[ResourceType.ApiGatewayRestApi];
// also exported as ApiGatewayRestApi

Attribute Types

The attribute types are all defined individually as interfaces with predictable names, and also as properties of the AttributeTypes interface keyed by the CloudFormation resource type. Note that not all resource types have attributes.

import { AttributeTypes, AttributeTypeFor } from '@fmtk/cfntypes';

type ApiGatewayAttribs = AttributeTypes[ResourceType.ApiGatewayRestApi];
// also exported as ApiGatewayRestApiAttributes

// the AttributeTypeFor helper returns `never` for resources
// with no attributes defined
type NeverAttribs = AttributeTypeFor<ResourceType.ApiGatewayAccount>;

About

Automatically generated type definitions for CloudFormation, kept up-to-date by an automated build

Resources

Stars

Watchers

Forks

Packages

No packages published