An interface is a syntactical contract that an entity should conform to. typescript extend htmlprops. When you have a top-level export, your file is a module, which means all declarations are introduced at the module scope rather than the global scope.This means that interface ObjectConstructor declares a new type ObjectConstructor (at the module scope) rather than merging with the ObjectConstructor type from the global scope.. Variable Declarations. var obj1 = {. In an object destructuring pattern, shape: Shape means “grab the property shape and redefine it locally as a variable named Shape.Likewise xPos: number creates a variable named number whose value is based on the parameter’s xPos.. This typescript tutorial explains TypeScript Map, how we can create a map in typescript, various map properties and methods. }; // Creating second object. TypeScript: Match the exact object shape. Program: