{
"name": "ts_browser_test___",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "^1.12.5",
"typescript": "^5.3.3"
}
}
{
"compilerOptions": {
"target": "es2016",
"lib": [
"es2016",
"DOM"
],
"module": "commonjs",
"rootDir": "src",
"sourceMap": true,
"outDir": "build",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>bobbyhadz.com</title>
<style>
#container {
background-color: lime;
width: 450px;
height: 450px;
}
</style>
</head>
<body>
<div id="container">
<h2>bobbyhadz.com</h2>
</div>
<script src="./src/index.ts"></script>
</body>
</html>
window.example = 'bobbyhadz.com';
console.log(window.example);
export { };
declare global {
interface Window {
example: any;
}
}