Run: npm init -y
npm install typescript --save-dev
npx tsc --init
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6 <title>Typescript Page</title>
7 <script src="https://cdn.tailwindcss.com"></script>
8 <style>
9 html, body {
10 margin: 0;
11 padding: 0;
12 height: 100vh;
13 width: 100vw;
14 overflow: hidden;
15 font-family: 'Inter', sans-serif;
16 }
17 .container {
18 flex: 1;
19 display: flex;
20 flex-direction: column;
21 height: 100%;
22 width: 100%;
23 }
24 .iframe {
25 width: 100%;
26 height: 100%;
27 border: none;
28 border-radius: 0.5rem;
29 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
30 }
31 </style>
32</head>
33<body>
34 <div class="container">
35 <iframe
36 src="http://staging.tetrons.com/editor/dist/editor-host.html"
37 width="100%" height="600"
38 style="border: none;"
39 allowfullscreen>
40 </iframe>
41 </div>
42 <script src="script.js"></script>
43</body>
44</html>
1document.addEventListener(“DOMContentLoaded”, () => {
2 console.log(“Typescript loaded and compiled”);
3});
Run: npx tsc
Open index.html using live server or directly from file explorer.