Skip to content

Commit

Permalink
typescript: intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
kherin committed Mar 5, 2024
1 parent f7b14fc commit 99751f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typescript/module01.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<h1>Test JavaScript</h1>
<p id="date"></p>
<p>This page calls the script module01.js and is used for testing.</p>
<script src="./build/module02.js"></script>
<p>This page calls the script module03.js and is used for testing.</p>
<script src="./build/module03.js"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions typescript/module03.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
interface Employee {
name: string;
age: number;
}

interface Manager {
stockPlan: boolean;
}

const executive: Employee & Manager = {
name: 'Jhon',
age: 24,
stockPlan: true
};

console.log(executive);

0 comments on commit 99751f5

Please sign in to comment.