@alixq/ts-as

Exports a simple global 'as' function to typecheck a value in an expression

Usage no npm install needed!

<script type="module">
  import alixqTsAs from 'https://cdn.skypack.dev/@alixq/ts-as';
</script>

README

TypeScript library implementing an as function that returns itself but allows to typecheck a value. Meant for internal use. Will import the function and type globally.