mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update the Atom type definitions. * Atom: support additional dtslint rules. Minor fixes to definitions. * Atom: enable unified signatures for dtslint. * Atom: fix the scan and replace functions. Enable ban-types in dtslint. * Atom: enable no-declare-current-package and no-single-declare-module.
1.1 KiB
1.1 KiB
TextBuffer Type Definitions
TypeScript type definitions for TextBuffer, which is published as "text-buffer" on NPM.
Usage Notes
Exports
This module has a single entity as its export: the TextBuffer class. The require syntax is typically used to import modules like this.
import TextBuffer = require("text-buffer");
Point and Range
Both the Point class and the Range class are anchored onto the TextBuffer class as static properties, allowing construction of both despite TextBuffer being the singular export.
import TextBuffer = require("text-buffer");
let point = new TextBuffer.Point(0, 0);
let range = new TextBuffer.Range([0, 0], [1, 4]);
The TextBuffer Namespace
The three primary classes of TextBuffer are Point, Range, and TextBuffer, yet there are many other types passed around and used by it. Many of the types used by TextBuffer can be referenced from the TextBuffer namespace.
function example(marker: TextBuffer.Marker) {}