(*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

val key : allow_optional:bool -> ('loc, 'loc) Flow_ast.Expression.t -> Key.t option

val get :
  allow_optional:bool -> Context.t -> ('loc, 'loc) Flow_ast.Expression.t -> ALoc.t -> Type.t option

val key_of_pattern : allow_optional:bool -> ('loc, 'loc) Flow_ast.Pattern.t -> Key.t option

val get_of_pattern :
  allow_optional:bool -> Context.t -> ('loc, 'loc) Flow_ast.Pattern.t -> ALoc.t -> Type.t option

(*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

val key : allow_optional:bool -> ('loc, 't) Flow_ast.Expression.t -> Key.t option

val get :
  allow_optional:bool -> Context.t -> ('loc, 't) Flow_ast.Expression.t -> ALoc.t -> Type.t option

val key_of_pattern : allow_optional:bool -> ('loc, 't) Flow_ast.Pattern.t -> Key.t option

val get_of_pattern :
  allow_optional:bool -> Context.t -> ('loc, 't) Flow_ast.Pattern.t -> ALoc.t -> Type.t option

Make Refinement API accept typed AST as well
Make Refinement API accept typed AST as well

Summary: It doesn't matter functionality wise for refinement.ml if the AST is typed or not. So allow the typed AST to be able to be passed.

Reviewed By: mroch

Differential Revision: D21343900

fbshipit-source-id: 6c6a882cf773985bab63dbedf91afa1cc0fac4d8
