Skip to content

Implement tagged templates (blocked on TypeScript#49552) #1

@flightofthefox

Description

@flightofthefox

Note to check in on microsoft/TypeScript#49552 periodically.

This would allow using a tagged templates to interpolate while still returning strong types:

const result = await DB.query(sql`SELECT * from posts WHERE author = ${userId}`);
if (result[0]) {
  console.log(result[0].id); // Has type completion/checking for fields
}

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