mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Add html element example
parent
48c7facece
commit
231998f4df
@ -63,6 +63,14 @@ var var8;
|
||||
/** @type {{a: string, b: number}} */
|
||||
var var9;
|
||||
|
||||
// You can specify as an HTML Element
|
||||
|
||||
// An element with dom properties
|
||||
/** @type {HTMLElement} myElement */
|
||||
var myElement = document.querySelector(selector);
|
||||
element.dataset.myData = '';
|
||||
|
||||
|
||||
// "@typedef" may be used to define complex types
|
||||
// (this same same syntax works with @param)
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user