mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-05 23:27:40 +00:00
* Add (...args: any[]) to a parameter list * Remove hack for Node's `global` object. * Add --lib WebWorker to TSC's options
59 lines
2.1 KiB
TypeScript
59 lines
2.1 KiB
TypeScript
/*
|
|
* Copyright (c) 2018 National Research Council Canada (author: Eddie A. Santos)
|
|
* Copyright (c) 2018 SIL International
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
* this software and associated documentation files (the "Software"), to deal in
|
|
* the Software without restriction, including without limitation the rights to
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
* subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
/**
|
|
* A JavaScript string with the restriction that it must only
|
|
* contain Unicode scalar values.
|
|
*
|
|
* This means that any lone high surrogate must be paired with
|
|
* a low surrogate, if it exists. Lone surrogate code units are
|
|
* forbidden.
|
|
*
|
|
* See also: https://developer.mozilla.org/en-US/docs/Web/API/USVString
|
|
*/
|
|
type USVString = string;
|
|
|
|
/**
|
|
* Describes a potential change to a text buffer.
|
|
*/
|
|
interface Transform {
|
|
/**
|
|
* The Unicode scalar values (i.e., characters) to be inserted at the
|
|
* cursor position.
|
|
*
|
|
* Corresponds to `s` in com.keyman.KeyboardInterface.output.
|
|
*/
|
|
insert: USVString;
|
|
|
|
/**
|
|
* The number of code units to delete to the left of the cursor.
|
|
*
|
|
* Corresponds to `dn` in com.keyman.KeyboardInterface.output.
|
|
*/
|
|
delete: number;
|
|
|
|
/**
|
|
* The number of code units to delete to the right of the cursor.
|
|
* Not available on all platforms.
|
|
*/
|
|
deleteRight?: number;
|
|
}
|