Add license, use ReadonlyArray

pull/44/head
Franklin Tse 5 years ago
parent 4e6b0876e9
commit ce4171a3b7

41
types/easymde.d.ts vendored

@ -1,3 +1,24 @@
// This file is based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/simplemde/index.d.ts,
// which is written by Scalesoft <https://github.com/Scalesoft> and licensed under the MIT license:
//
// 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.
/// <reference types="codemirror"/>
declare namespace EasyMDE {
@ -14,10 +35,10 @@ declare namespace EasyMDE {
}
interface InsertTextOptions {
horizontalRule?: string[];
image?: string[];
link?: string[];
table?: string[];
horizontalRule?: ReadonlyArray<string>;
image?: ReadonlyArray<string>;
link?: ReadonlyArray<string>;
table?: ReadonlyArray<string>;
}
interface ParsingOptions {
@ -31,7 +52,7 @@ declare namespace EasyMDE {
codeSyntaxHighlighting: boolean;
}
interface ShortcutsArray {
interface Shortcuts {
[action: string]: string | undefined | null;
toggleBlockquote?: string | null;
toggleBold?: string | null;
@ -69,7 +90,7 @@ declare namespace EasyMDE {
blockStyles?: BlockStyleOptions;
element?: HTMLElement;
forceSync?: boolean;
hideIcons?: string[];
hideIcons?: ReadonlyArray<string>;
indentWithTabs?: boolean;
initialValue?: string;
insertTexts?: InsertTextOptions;
@ -79,13 +100,13 @@ declare namespace EasyMDE {
previewRender?: (markdownPlaintext: string, previewElement: HTMLElement) => string;
promptURLs?: boolean;
renderingConfig?: RenderingOptions;
shortcuts?: ShortcutsArray;
showIcons?: string[];
shortcuts?: Shortcuts;
showIcons?: ReadonlyArray<string>;
spellChecker?: boolean;
status?: boolean|Array<string|StatusBarItem>;
status?: boolean|ReadonlyArray<string|StatusBarItem>;
styleSelectedText?: boolean;
tabSize?: number;
toolbar?: boolean|Array<string|ToolbarIcon>;
toolbar?: boolean|ReadonlyArray<string|ToolbarIcon>;
toolbarTips?: boolean;
}
}

Loading…
Cancel
Save