|
…
|
||
|---|---|---|
| .. | ||
| atom-keymap-tests.ts | ||
| index.d.ts | ||
| README.md | ||
| tsconfig.json | ||
| tslint.json | ||
Atom Keymap Type Definitions
TypeScript type definitions for Atom Keymap, which is published as "atom-keymap" on NPM.
Usage Notes
Exports
This module has a single entity as its export: the KeymapManager class. The require syntax is typically used to import modules like this.
import KeymapManager = require("atom-keymap");
The AtomKeymap Namespace
Many of the types used by Atom Keymap can be referenced from the AtomKeymap namespace.
function example(keybind: AtomKeymap.KeyBinding) {}
Exposing Private Methods and Properties
Declaration Merging can be used to augment any of the types used within Atom Keymap. As an example, if we wanted to reveal the private partialMatchTimeout property within the KeymapManager class, then we would create a file with the following contents:
// <<filename>>.d.ts
declare namespace AtomKeymap {
interface KeymapManager {
partialMatchTimeout: number;
}
}
Once this file is either referenced or included within your project, then this new property would be freely usable on instances of the KeymapManager class without TypeScript reporting errors.