astro/.changeset/neat-seas-peel.md
Matthew Phillips 9a813268db
Allow TypeScript in hoisted scripts (#3665)
* Allow TypeScript in hoisted scripts

* Pass skipSelf

* Fix linting
2022-06-22 12:47:52 -04:00

365 B

astro
patch

Allow TypeScript inside script tags

This makes it so that you can use TypeScript inside of script tags like so:

<script>
  interface Person {
    name: string;
  }

  const person: Person = {
    name: 'Astro'
  };

  console.log(person);
</script>

Note that the the VSCode extension does not currently support this, however.