Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Regression in type definitions for resources #13183

Copy link
Copy link
@jakeleventhal

Description

@jakeleventhal
Issue body actions

Issue description

When updating @serverless/typescript from 4.14.1 to 4.27.1, the resources seems to have a non-documented breaking change. It used to allow any string as the key with a properly typed value. The allowed keys were Fn::Transform and any string.

This is the failing code in question:

const X: AWS = {
  // ...
  resources: {
    Resources: {
      ApiOrderQueue: {
        Properties: {
          FifoQueue: true,
          QueueName: ORDER_SUBSCRIPTION_QUEUE_NAME,
          VisibilityTimeout: UPDATE_ORDER_STATUS_TIMEOUT_IN_SECONDS,
        },
        Type: "AWS::SQS::Queue",
      },
    },
  },
};
Object literal may only specify known properties, and 'ApiOrderQueue' does not exist in type '{ "Fn::Transform"?: { Name: string; Parameters?: { [k: string]: unknown; } | undefined; } | undefined; }'.ts(2353)

Would've opened up on the typescript repo, but seems the types are just derived from source here.

Context

▶ pnpm serverless --support                                                                                                                       

Serverless ϟ Framework

Welcome to Serverless Framework V.4

This is a Serverless Framework Service. Let's do some quick checks to ensure it's set up correctly.

Your Serverless Framework Service is ready to deploy.
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.