File tree Expand file tree Collapse file tree 3 files changed +3
-28
lines changed Expand file tree Collapse file tree 3 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -2086,8 +2086,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
20862086 {
20872087 env;
20882088 definition = `NameOnly " jsxConfig" ;
2089- path = None ;
2090- attributes = [] ;
20912089 fields =
20922090 [
20932091 mkField ~name: " version" ~primitive: Predef. path_int;
@@ -2117,8 +2115,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
21172115 Trecord
21182116 {
21192117 env;
2120- path = None ;
2121- attributes = [] ;
21222118 definition = `NameOnly " importAttributesConfig" ;
21232119 fields = [mkField ~name: " type_" ~primitive: Predef. path_string];
21242120 }
@@ -2127,8 +2123,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
21272123 Trecord
21282124 {
21292125 env;
2130- path = None ;
2131- attributes = [] ;
21322126 definition = `NameOnly " moduleConfig" ;
21332127 fields =
21342128 [
Original file line number Diff line number Diff line change @@ -354,8 +354,6 @@ and completionType =
354354 | Trecord of {
355355 env : QueryEnv .t ;
356356 fields : field list ;
357- path : Path .t option ;
358- attributes : Parsetree .attributes ;
359357 definition :
360358 [ `NameOnly of string
361359 (* * When we only have the name, like when pulling the record from a declared type. *)
Original file line number Diff line number Diff line change @@ -383,23 +383,14 @@ let rec extractType ?(printOpeningDebug = true)
383383 variantDecl = decl;
384384 },
385385 typeArgContext )
386- | Some
387- (envFromDeclaration, {item = {kind = Record fields; decl; attributes}})
388- ->
386+ | Some (envFromDeclaration , {item = {kind = Record fields ; decl} } ) ->
389387 if Debug. verbose () then print_endline " [extract_type]--> found record" ;
390388 (* Need to create a new type arg context here because we're sending along a type expr that might have type vars. *)
391389 let typeArgContext =
392390 maybeSetTypeArgCtx ~type Params:decl.type_params ~type Args env
393391 in
394392 Some
395- ( Trecord
396- {
397- env = envFromDeclaration;
398- path = Some path;
399- fields;
400- definition = `TypeExpr t;
401- attributes;
402- },
393+ ( Trecord {env = envFromDeclaration; fields; definition = `TypeExpr t},
403394 typeArgContext )
404395 | Some (envFromDeclaration , {item = {name = "t" ; decl = {type_params} } } ) ->
405396 let typeArgContext =
@@ -580,15 +571,7 @@ let extractTypeFromResolvedType (typ : Type.t) ~env ~full =
580571 match typ.kind with
581572 | Tuple items -> Some (Tuple (env, items, Ctype. newty (Ttuple items)))
582573 | Record fields ->
583- Some
584- (Trecord
585- {
586- env;
587- fields;
588- path = None ;
589- definition = `NameOnly typ.name;
590- attributes = typ.attributes;
591- })
574+ Some (Trecord {env; fields; definition = `NameOnly typ.name})
592575 | Variant constructors ->
593576 Some
594577 (Tvariant
You can’t perform that action at this time.
0 commit comments