/**
 * Copyright (c) 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule DraftDecorator
 * @flow
 */

'use strict';

import type ContentBlock from 'ContentBlock';
import type ContentState from 'ContentState';

/**
 * A DraftDecorator is a strategy-component pair intended for use when
 * rendering content.
 *
 *   - A "strategy": A function that accepts a ContentBlock object and
 *     continuously executes a callback with start/end values corresponding to
 *     relevant matches in the document text. For example, getHashtagMatches
 *     uses a hashtag regex to find hashtag strings in the block, and
 *     for each hashtag match, executes the callback with start/end pairs.
 *
 *   - A "component": A React component that will be used to render the
 *     "decorated" section of text.
 *
 *   - "props": Props to be passed into the React component that will be used.
 */
export type DraftDecorator = {
  strategy: (
    block: ContentBlock,
    callback: (start: number, end: number) => void,
    contentState: ContentState,
  ) => void,
  component: Function,
  props?: Object,
};

@@ -457,16 +457,170 @@
 tate';%0A%0A
+export type DraftDecoratorStrategy = (%0A  block: ContentBlock,%0A  callback: (start: number, end: number) =%3E void,%0A  contentState: ContentState,%0A) =%3E void;%0A%0A
 /**%0A * A
@@ -1327,130 +1327,30 @@
 gy: 
-(%0A    block: ContentBlock,%0A    callback: (start: number, end: number) =%3E void,%0A    contentState: Content
+DraftDecorator
 St
+r
 ate
-,%0A  ) =%3E void
+gy
 ,%0A  

Add DraftDecoratorStrategy type (#826)