API for creating pastes without showing notifications

Reviewed By: mweststrate

Differential Revision: D33277470

fbshipit-source-id: 2ec9ad7d9fc48d7d2da64be3bfc1a66bb5b3a347
This commit is contained in:
Anton Nikolaev
2021-12-22 15:33:08 -08:00
committed by Facebook GitHub Bot
parent 6b8588c5ef
commit dd4d7bbe7f
6 changed files with 37 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ import {batched} from '../state/batch';
import {Idler} from '../utils/Idler';
import {Notification} from './Notification';
import {Logger} from '../utils/Logger';
import {CreatePasteArgs, CreatePasteResult} from './Paste';
type StateExportHandler<T = any> = (
idler: Idler,
@@ -94,7 +95,9 @@ export interface BasePluginClient {
* Creates a Paste (similar to a Github Gist).
* Facebook only function. Resolves to undefined if creating a paste failed.
*/
createPaste(input: string): Promise<string | undefined>;
createPaste(
args: string | CreatePasteArgs,
): Promise<CreatePasteResult | undefined>;
/**
* Returns true if this is an internal Facebook build.