Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SES.Template recursively references wrong type #69

Open
DCzajkowski opened this issue Feb 16, 2022 · 0 comments
Open

SES.Template recursively references wrong type #69

DCzajkowski opened this issue Feb 16, 2022 · 0 comments

Comments

@DCzajkowski
Copy link

This line should reference TemplateInner defined in line 3, but instead references Template.

Expected usage:

import { SES } from 'cloudform'

{
  SesTemplate: new SES.Template({
    Template: {
      HtmlPart: 'String',
      SubjectPart: 'String',
      TemplateName: 'String',
      TextPart: 'String',
    },
  }),
}

Actual usage:

import { SES } from 'cloudform'
import { TemplateInner } from 'cloudform-types/types/ses/template'

{
  SesTemplate: new SES.Template({
    Template: (() => {
      const template: TemplateInner = {
        HtmlPart: 'String',
        SubjectPart: 'String',
        TemplateName: 'String',
        TextPart: 'String',
      }

      return template as SES.Template // This cast is due to incorrect types in cloudform.
    })(),
  }),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant