Skip to content

Not highlighted with TypeScript Generics #114

Description

@ariesclark

The following code should be properly highlighted, but is not. Removing the generic type will cause the string to be highlighted again.

const { data } = await sql<{
  date: Date;
  foo: number;
  bar: number;
}>`
  select
    toStartOfInterval(timestamp, ${interval(5, "minute")}) AS date,
    sum(_sample_interval * double2) / sum(_sample_interval) as foo,
    sum(_sample_interval * double3) / sum(_sample_interval) as bar

  from analytics

  where timestamp >= now() - ${interval(7, "day")}
    and timestamp <= now()
    and index1 = ${worldId}

  group by date
  order by date
`;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions