@types/codeflask
TypeScript icon, indicating that this package has built-in type declarations

1.4.6 • Public • Published

Installation

npm install --save @types/codeflask

Summary

This package contains type definitions for codeflask (https://kazzkiq.github.io/CodeFlask/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/codeflask.

index.d.ts

import { Languages } from "prismjs";

declare class CodeFlask {
    constructor(selectorOrElement: string | HTMLElement, opts: CodeFlask.options);
    onUpdate(callback: (code: string) => void): void;
    updateCode(newCode: string): void;
    getCode(): string;
    addLanguage(name: string, options: Languages): void;
}

export = CodeFlask;

declare namespace CodeFlask {
    interface options {
        language?: string | undefined;
        rtl?: boolean | undefined;
        tabSize?: number | undefined;
        enableAutocorrect?: boolean | undefined;
        lineNumbers?: boolean | undefined;
        defaultTheme?: boolean | undefined;
        areaId?: string | undefined;
        ariaLabelledby?: string | undefined;
        readonly?: boolean | undefined;
        handleTabs?: boolean | undefined;
        handleSelfClosingCharacters?: boolean | undefined;
        handleNewLineIndentation?: boolean | undefined;
        styleParent?: ShadowRoot | undefined;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/prismjs

Credits

These definitions were written by Joachim Holwech.

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @types/codeflask

Weekly Downloads

1,111

Version

1.4.6

License

MIT

Unpacked Size

4.58 kB

Total Files

5

Last publish

Collaborators

  • types