Prompt.d.ts 819 B

12345678910111213141516171819202122232425
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. import type { ScrollOptions } from '../types';
  8. export default class Prompt {
  9. private _entering;
  10. private _value;
  11. private _onChange;
  12. private _onSuccess;
  13. private _onCancel;
  14. private _offset;
  15. private _promptLength;
  16. private _selection;
  17. constructor();
  18. private _onResize;
  19. enter(onChange: (pattern: string, options: ScrollOptions) => void, onSuccess: (pattern: string) => void, onCancel: () => void): void;
  20. setPromptLength(length: number): void;
  21. setPromptSelection(selected: string): void;
  22. put(key: string): void;
  23. abort(): void;
  24. isEntering(): boolean;
  25. }