File tree 3 files changed +3
-28
lines changed
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 =
2086
2086
{
2087
2087
env;
2088
2088
definition = `NameOnly " jsxConfig" ;
2089
- path = None ;
2090
- attributes = [] ;
2091
2089
fields =
2092
2090
[
2093
2091
mkField ~name: " version" ~primitive: Predef. path_int;
@@ -2117,8 +2115,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
2117
2115
Trecord
2118
2116
{
2119
2117
env;
2120
- path = None ;
2121
- attributes = [] ;
2122
2118
definition = `NameOnly " importAttributesConfig" ;
2123
2119
fields = [mkField ~name: " type_" ~primitive: Predef. path_string];
2124
2120
}
@@ -2127,8 +2123,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
2127
2123
Trecord
2128
2124
{
2129
2125
env;
2130
- path = None ;
2131
- attributes = [] ;
2132
2126
definition = `NameOnly " moduleConfig" ;
2133
2127
fields =
2134
2128
[
Original file line number Diff line number Diff line change @@ -354,8 +354,6 @@ and completionType =
354
354
| Trecord of {
355
355
env : QueryEnv .t ;
356
356
fields : field list ;
357
- path : Path .t option ;
358
- attributes : Parsetree .attributes ;
359
357
definition :
360
358
[ `NameOnly of string
361
359
(* * 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)
383
383
variantDecl = decl;
384
384
},
385
385
typeArgContext )
386
- | Some
387
- (envFromDeclaration, {item = {kind = Record fields; decl; attributes}})
388
- ->
386
+ | Some (envFromDeclaration , {item = {kind = Record fields ; decl} } ) ->
389
387
if Debug. verbose () then print_endline " [extract_type]--> found record" ;
390
388
(* Need to create a new type arg context here because we're sending along a type expr that might have type vars. *)
391
389
let typeArgContext =
392
390
maybeSetTypeArgCtx ~type Params:decl.type_params ~type Args env
393
391
in
394
392
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},
403
394
typeArgContext )
404
395
| Some (envFromDeclaration , {item = {name = "t" ; decl = {type_params} } } ) ->
405
396
let typeArgContext =
@@ -580,15 +571,7 @@ let extractTypeFromResolvedType (typ : Type.t) ~env ~full =
580
571
match typ.kind with
581
572
| Tuple items -> Some (Tuple (env, items, Ctype. newty (Ttuple items)))
582
573
| 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})
592
575
| Variant constructors ->
593
576
Some
594
577
(Tvariant
You can’t perform that action at this time.
0 commit comments