diff --git a/changes/print-type-annotations.fix.md b/changes/print-type-annotations.fix.md new file mode 100644 index 0000000000..b2d436f504 --- /dev/null +++ b/changes/print-type-annotations.fix.md @@ -0,0 +1 @@ +- Keep `@tag`, `@notUndefined`, `@instanceOf` and `@typeOf` when printing a type declaration, in error messages, hover and generated interfaces. diff --git a/compiler/ml/includecore.ml b/compiler/ml/includecore.ml index 3579398672..e45afc50f7 100644 --- a/compiler/ml/includecore.ml +++ b/compiler/ml/includecore.ml @@ -201,7 +201,9 @@ let label side decl = in String.capitalize_ascii (side ^ " " ^ decl) -let report_type_mismatch0 first second decl ppf err = +(* [lead_in] introduces the two lines of a difference in runtime + representation; without it they stand under a lead-in printed before *) +let report_type_mismatch0 ?(lead_in = true) first second decl ppf err = let pr fmt = Format.fprintf ppf fmt in match err with | Arity -> pr "They have different arities" @@ -243,24 +245,41 @@ let report_type_mismatch0 first second decl ppf err = | Variant_representation s -> pr "The internal representations for case %s are not equal" (Ident.name s) | Not_undefined -> - pr - "@[Their runtime representations differ:@,\ - %s: can hold undefined@,\ - %s: @notUndefined@]" - (label first decl) (label second decl) + if lead_in then pr "@[Their runtime representations differ:@,"; + pr "%s: can hold undefined@,%s: @notUndefined" (label first decl) + (label second decl); + if lead_in then pr "@]" | Runtime_annotation (declared1, declared2) -> - pr "@[Their runtime representations differ:@,%s: %s@,%s: %s@]" - (label first decl) declared1 (label second decl) declared2 + if lead_in then pr "@[Their runtime representations differ:@,"; + pr "%s: %s@,%s: %s" (label first decl) declared1 (label second decl) + declared2; + if lead_in then pr "@]" -let report_type_mismatch first second decl ppf = - List.iter (fun err -> - match err with - | Manifest -> () - (* Its lines are labels, not sentences *) - | Runtime_annotation _ | Not_undefined -> - Format.fprintf ppf "@ %a" (report_type_mismatch0 first second decl) err - | _ -> - Format.fprintf ppf "@ %a." (report_type_mismatch0 first second decl) err) +(* Each reason on a line after a break. [read_the_same] puts them under a note + that the declarations print the same, which then replaces the lead-in of a + difference in runtime representation. *) +let report_type_mismatch ?(read_the_same = false) first second decl ppf errs = + let report ppf = + List.iter (fun err -> + match err with + | Manifest -> () + (* Its lines are labels, not sentences *) + | Runtime_annotation _ | Not_undefined -> + Format.fprintf ppf "@ %a" + (report_type_mismatch0 ~lead_in:(not read_the_same) first second + decl) + err + | _ -> + Format.fprintf ppf "@ %a." + (report_type_mismatch0 first second decl) + err) + in + if read_the_same then + Format.fprintf ppf + "@ @[The declarations read the same, but a type they mention \ + differs:%a@]" + report errs + else report ppf errs let rec compare_constructor_arguments env cstr params1 params2 arg1 arg2 = match (arg1, arg2) with diff --git a/compiler/ml/includecore.mli b/compiler/ml/includecore.mli index 96679120ec..79deeaa694 100644 --- a/compiler/ml/includecore.mli +++ b/compiler/ml/includecore.mli @@ -67,4 +67,10 @@ val extension_constructors : Env.t -> Ident.t -> extension_constructor -> extension_constructor -> bool val report_type_mismatch : - string -> string -> string -> Format.formatter -> type_mismatch list -> unit + ?read_the_same:bool -> + string -> + string -> + string -> + Format.formatter -> + type_mismatch list -> + unit diff --git a/compiler/ml/includemod.ml b/compiler/ml/includemod.ml index aee078f519..d546c58ce1 100644 --- a/compiler/ml/includemod.ml +++ b/compiler/ml/includemod.ml @@ -583,8 +583,16 @@ let include_symptom ~swapped env ppf = function if swapped then ("the expected", "the actual") else ("the actual", "the expected") in + (* Declarations can print the same and still differ, when a type they + mention differs between the two sides, e.g. a class the interface + leaves abstract. The reasons then say that first. *) + let read_the_same = + Format.asprintf "%a" (type_declaration id) d1 + = Format.asprintf "%a" (type_declaration id) d2 + in fprintf ppf "@,%a" - (Includecore.report_type_mismatch first second "declaration") + (Includecore.report_type_mismatch ~read_the_same first second + "declaration") errs | Extension_constructors (id, x1, x2) -> show_declarations ~swapped (extension_constructor id) ppf diff --git a/compiler/ml/outcometree.ml b/compiler/ml/outcometree.ml index 6e011c356f..9e242f5760 100644 --- a/compiler/ml/outcometree.ml +++ b/compiler/ml/outcometree.ml @@ -70,8 +70,9 @@ and out_type_decl = { otype_params: (string * (bool * bool)) list; otype_type: out_type; otype_private: Asttypes.private_flag; - otype_immediate: bool; - otype_unboxed: bool; + otype_attributes: string list; + (** The annotations that change what the declaration means at run time, + as they are written, e.g. [@unboxed] or [@tag("kind")] *) otype_cstrs: (out_type * out_type) list; } and out_extension_constructor = { diff --git a/compiler/ml/printtyp.ml b/compiler/ml/printtyp.ml index 793893c9a4..c9a19c4a15 100644 --- a/compiler/ml/printtyp.ml +++ b/compiler/ml/printtyp.ml @@ -892,14 +892,35 @@ and tree_of_type_decl id decl = decl.type_private, decl.type_representation = Unboxed ) in - let immediate = Builtin_attributes.immediate decl.type_attributes in + let attributes = + let flag set attribute = if set then [attribute] else [] in + (* A malformed annotation was reported when the declaration was typed *) + let stated process = + try process decl.type_attributes + with Ast_untagged_variants.Error _ -> None + in + List.concat + [ + flag (Builtin_attributes.immediate decl.type_attributes) "@immediate"; + flag unboxed "@unboxed"; + (match stated Ast_untagged_variants.process_tag_name with + | Some name -> + [Printf.sprintf "@tag(\"%s\")" (String_literal.encode_js_string name)] + | None -> []); + (match + stated (Ast_untagged_variants.process_runtime_annotation ?loc:None) + with + | Some annotation -> + [Ast_untagged_variants.runtime_annotation_to_string annotation] + | None -> []); + ] + in { otype_name = name; otype_params = args; otype_type = ty; otype_private = priv; - otype_immediate = immediate; - otype_unboxed = unboxed; + otype_attributes = attributes; otype_cstrs = constraints; } diff --git a/compiler/syntax/src/res_outcome_printer.ml b/compiler/syntax/src/res_outcome_printer.ml index 8dca31da6b..831466e4d9 100644 --- a/compiler/syntax/src/res_outcome_printer.ml +++ b/compiler/syntax/src/res_outcome_printer.ml @@ -661,11 +661,10 @@ let rec print_out_sig_item_doc ?(print_name_as_is = false) | Osig_type (out_type_decl, out_rec_status) -> (* TODO: manifest ? *) let attrs = - match (out_type_decl.otype_immediate, out_type_decl.otype_unboxed) with - | false, false -> Doc.nil - | true, false -> Doc.concat [Doc.text "@immediate"; Doc.line] - | false, true -> Doc.concat [Doc.text "@unboxed"; Doc.line] - | true, true -> Doc.concat [Doc.text "@immediate @unboxed"; Doc.line] + match out_type_decl.otype_attributes with + | [] -> Doc.nil + | attributes -> + Doc.concat [Doc.text (String.concat " " attributes); Doc.line] in let kw = Doc.text diff --git a/tests/analysis_tests/tests/src/CreateInterfaceFunctor.res b/tests/analysis_tests/tests/src/CreateInterfaceFunctor.res index c1374f2fd8..3059779a2c 100644 --- a/tests/analysis_tests/tests/src/CreateInterfaceFunctor.res +++ b/tests/analysis_tests/tests/src/CreateInterfaceFunctor.res @@ -32,3 +32,12 @@ module WithWire = (X: {}) => { } module Applied = WithWire({}) + +// Types of an applied functor keep their @tag +module type Type = { + type t +} + +module Tagged = (X: Type) => { + @tag("kind") type wrapped = Value({value: X.t}) | Empty({reason: string}) +} diff --git a/tests/analysis_tests/tests/src/CreateInterfaceFunctorUse.res b/tests/analysis_tests/tests/src/CreateInterfaceFunctorUse.res index 864922f99d..963f8aaaea 100644 --- a/tests/analysis_tests/tests/src/CreateInterfaceFunctorUse.res +++ b/tests/analysis_tests/tests/src/CreateInterfaceFunctorUse.res @@ -9,3 +9,7 @@ include CreateInterfaceFunctor.MakeSet({ type t = float let compare = (a: float, b) => a < b ? -1 : a > b ? 1 : 0 }) + +module IntTagged = CreateInterfaceFunctor.Tagged({ + type t = int +}) diff --git a/tests/analysis_tests/tests/src/expected/Completion.res.txt b/tests/analysis_tests/tests/src/expected/Completion.res.txt index 8e9d650fdb..ae03473775 100644 --- a/tests/analysis_tests/tests/src/expected/Completion.res.txt +++ b/tests/analysis_tests/tests/src/expected/Completion.res.txt @@ -2371,7 +2371,7 @@ Hover src/Completion.res 349:14 { "contents": { "kind": "markdown", - "value": "```rescript\nJsxDOM.domProps\n```\n\n---\n\n```\n \n```\n```rescript\ntype JsxDOM.domProps = {\n key?: string,\n children?: Jsx.element,\n ref?: domRef,\n allow?: string,\n @as(\"aria-current\") ariaCurrent?: [\n | #date\n | #\"false\"\n | #location\n | #page\n | #step\n | #time\n | #\"true\"\n ],\n @as(\"aria-details\") ariaDetails?: string,\n @as(\"aria-disabled\") ariaDisabled?: bool,\n @as(\"aria-hidden\") ariaHidden?: bool,\n @as(\"aria-invalid\") ariaInvalid?: [\n | #\"false\"\n | #grammar\n | #spelling\n | #\"true\"\n ],\n @as(\"aria-keyshortcuts\") ariaKeyshortcuts?: string,\n @as(\"aria-label\") ariaLabel?: string,\n @as(\"aria-roledescription\") ariaRoledescription?: string,\n @as(\"aria-autocomplete\") ariaAutocomplete?: [\n | #both\n | #inline\n | #list\n | #none\n ],\n @as(\"aria-checked\") ariaChecked?: [\n | #\"false\"\n | #mixed\n | #\"true\"\n ],\n @as(\"aria-expanded\") ariaExpanded?: bool,\n @as(\"aria-haspopup\") ariaHaspopup?: [\n | #dialog\n | #\"false\"\n | #grid\n | #listbox\n | #menu\n | #tree\n | #\"true\"\n ],\n @as(\"aria-level\") ariaLevel?: int,\n @as(\"aria-modal\") ariaModal?: bool,\n @as(\"aria-multiline\") ariaMultiline?: bool,\n @as(\"aria-multiselectable\") ariaMultiselectable?: bool,\n @as(\"aria-orientation\") ariaOrientation?: [\n | #horizontal\n | #undefined\n | #vertical\n ],\n @as(\"aria-placeholder\") ariaPlaceholder?: string,\n @as(\"aria-pressed\") ariaPressed?: [\n | #\"false\"\n | #mixed\n | #\"true\"\n ],\n @as(\"aria-readonly\") ariaReadonly?: bool,\n @as(\"aria-required\") ariaRequired?: bool,\n @as(\"aria-selected\") ariaSelected?: bool,\n @as(\"aria-sort\") ariaSort?: string,\n @as(\"aria-valuemax\") ariaValuemax?: float,\n @as(\"aria-valuemin\") ariaValuemin?: float,\n @as(\"aria-valuenow\") ariaValuenow?: float,\n @as(\"aria-valuetext\") ariaValuetext?: string,\n @as(\"aria-atomic\") ariaAtomic?: bool,\n @as(\"aria-busy\") ariaBusy?: bool,\n @as(\"aria-live\") ariaLive?: [\n | #assertive\n | #off\n | #polite\n | #rude\n ],\n @as(\"aria-relevant\") ariaRelevant?: string,\n @as(\"aria-dropeffect\") ariaDropeffect?: [\n | #copy\n | #execute\n | #link\n | #move\n | #none\n | #popup\n ],\n @as(\"aria-grabbed\") ariaGrabbed?: bool,\n @as(\"aria-activedescendant\") ariaActivedescendant?: string,\n @as(\"aria-colcount\") ariaColcount?: int,\n @as(\"aria-colindex\") ariaColindex?: int,\n @as(\"aria-colspan\") ariaColspan?: int,\n @as(\"aria-controls\") ariaControls?: string,\n @as(\"aria-describedby\") ariaDescribedby?: string,\n @as(\"aria-errormessage\") ariaErrormessage?: string,\n @as(\"aria-flowto\") ariaFlowto?: string,\n @as(\"aria-labelledby\") ariaLabelledby?: string,\n @as(\"aria-owns\") ariaOwns?: string,\n @as(\"aria-posinset\") ariaPosinset?: int,\n @as(\"aria-rowcount\") ariaRowcount?: int,\n @as(\"aria-rowindex\") ariaRowindex?: int,\n @as(\"aria-rowspan\") ariaRowspan?: int,\n @as(\"aria-setsize\") ariaSetsize?: int,\n defaultChecked?: bool,\n defaultValue?: string,\n accessKey?: string,\n capture?: [#environment | #user],\n className?: string,\n contentEditable?: bool,\n contextMenu?: string,\n @as(\"data-testid\") dataTestId?: string,\n dir?: string,\n draggable?: bool,\n hidden?: bool,\n id?: string,\n inert?: bool,\n lang?: string,\n popover?: popover,\n popoverTarget?: string,\n popoverTargetAction?: popoverTargetAction,\n role?: string,\n style?: style,\n spellCheck?: bool,\n tabIndex?: int,\n title?: string,\n itemID?: string,\n itemProp?: string,\n itemRef?: string,\n itemScope?: bool,\n itemType?: string,\n accept?: string,\n acceptCharset?: string,\n action?: string,\n allowFullScreen?: bool,\n alt?: string,\n @as(\"as\") as_?: string,\n async?: bool,\n autoComplete?: string,\n autoCapitalize?: string,\n autoFocus?: bool,\n autoPlay?: bool,\n challenge?: string,\n charSet?: string,\n checked?: bool,\n cite?: string,\n crossOrigin?: string,\n cols?: int,\n colSpan?: int,\n content?: string,\n controls?: bool,\n coords?: string,\n data?: string,\n dateTime?: string,\n default?: bool,\n defer?: bool,\n disabled?: bool,\n download?: string,\n encType?: string,\n form?: string,\n formAction?: string,\n formTarget?: string,\n formMethod?: string,\n frameBorder?: int,\n headers?: string,\n height?: string,\n high?: int,\n href?: string,\n hrefLang?: string,\n htmlFor?: string,\n httpEquiv?: string,\n icon?: string,\n inputMode?: string,\n integrity?: string,\n keyType?: string,\n kind?: string,\n label?: string,\n list?: string,\n loading?: [#eager | #lazy],\n loop?: bool,\n low?: int,\n manifest?: string,\n max?: string,\n maxLength?: int,\n media?: string,\n mediaGroup?: string,\n method?: string,\n min?: string,\n minLength?: int,\n multiple?: bool,\n muted?: bool,\n name?: string,\n nonce?: string,\n noValidate?: bool,\n @as(\"open\") open_?: bool,\n optimum?: int,\n pattern?: string,\n placeholder?: string,\n playsInline?: bool,\n poster?: string,\n preload?: string,\n radioGroup?: string,\n readOnly?: bool,\n rel?: string,\n required?: bool,\n reversed?: bool,\n rows?: int,\n rowSpan?: int,\n sandbox?: string,\n scope?: string,\n scoped?: bool,\n scrolling?: string,\n selected?: bool,\n shape?: string,\n size?: int,\n sizes?: string,\n span?: int,\n src?: string,\n srcDoc?: string,\n srcLang?: string,\n srcSet?: string,\n start?: int,\n step?: float,\n summary?: string,\n target?: string,\n @as(\"type\") type_?: string,\n useMap?: string,\n value?: string,\n width?: string,\n wrap?: string,\n onCancel?: JsxEvent.Synthetic.t => unit,\n onCancelCapture?: JsxEvent.Synthetic.t => unit,\n onClose?: JsxEvent.Synthetic.t => unit,\n onCloseCapture?: JsxEvent.Synthetic.t => unit,\n onFullscreenChange?: JsxEvent.Synthetic.t => unit,\n onFullscreenChangeCapture?: JsxEvent.Synthetic.t => unit,\n onFullscreenError?: JsxEvent.Synthetic.t => unit,\n onFullscreenErrorCapture?: JsxEvent.Synthetic.t => unit,\n onBeforeToggle?: JsxEvent.Toggle.t => unit,\n onBeforeToggleCapture?: JsxEvent.Toggle.t => unit,\n onToggle?: JsxEvent.Toggle.t => unit,\n onToggleCapture?: JsxEvent.Toggle.t => unit,\n onCopy?: JsxEvent.Clipboard.t => unit,\n onCopyCapture?: JsxEvent.Clipboard.t => unit,\n onCut?: JsxEvent.Clipboard.t => unit,\n onCutCapture?: JsxEvent.Clipboard.t => unit,\n onPaste?: JsxEvent.Clipboard.t => unit,\n onPasteCapture?: JsxEvent.Clipboard.t => unit,\n onCompositionEnd?: JsxEvent.Composition.t => unit,\n onCompositionEndCapture?: JsxEvent.Composition.t => unit,\n onCompositionStart?: JsxEvent.Composition.t => unit,\n onCompositionStartCapture?: JsxEvent.Composition.t => unit,\n onCompositionUpdate?: JsxEvent.Composition.t => unit,\n onCompositionUpdateCapture?: JsxEvent.Composition.t => unit,\n onKeyDown?: JsxEvent.Keyboard.t => unit,\n onKeyDownCapture?: JsxEvent.Keyboard.t => unit,\n onKeyPress?: JsxEvent.Keyboard.t => unit,\n onKeyPressCapture?: JsxEvent.Keyboard.t => unit,\n onKeyUp?: JsxEvent.Keyboard.t => unit,\n onKeyUpCapture?: JsxEvent.Keyboard.t => unit,\n onFocus?: JsxEvent.Focus.t => unit,\n onFocusCapture?: JsxEvent.Focus.t => unit,\n onBlur?: JsxEvent.Focus.t => unit,\n onBlurCapture?: JsxEvent.Focus.t => unit,\n onBeforeInput?: JsxEvent.Form.t => unit,\n onBeforeInputCapture?: JsxEvent.Form.t => unit,\n onChange?: JsxEvent.Form.t => unit,\n onChangeCapture?: JsxEvent.Form.t => unit,\n onInput?: JsxEvent.Form.t => unit,\n onInputCapture?: JsxEvent.Form.t => unit,\n onReset?: JsxEvent.Form.t => unit,\n onResetCapture?: JsxEvent.Form.t => unit,\n onSubmit?: JsxEvent.Form.t => unit,\n onSubmitCapture?: JsxEvent.Form.t => unit,\n onInvalid?: JsxEvent.Form.t => unit,\n onInvalidCapture?: JsxEvent.Form.t => unit,\n onAuxClick?: JsxEvent.Mouse.t => unit,\n onAuxClickCapture?: JsxEvent.Mouse.t => unit,\n onClick?: JsxEvent.Mouse.t => unit,\n onClickCapture?: JsxEvent.Mouse.t => unit,\n onContextMenu?: JsxEvent.Mouse.t => unit,\n onContextMenuCapture?: JsxEvent.Mouse.t => unit,\n onDoubleClick?: JsxEvent.Mouse.t => unit,\n onDoubleClickCapture?: JsxEvent.Mouse.t => unit,\n onDrag?: JsxEvent.Mouse.t => unit,\n onDragCapture?: JsxEvent.Mouse.t => unit,\n onDragEnd?: JsxEvent.Mouse.t => unit,\n onDragEndCapture?: JsxEvent.Mouse.t => unit,\n onDragEnter?: JsxEvent.Mouse.t => unit,\n onDragEnterCapture?: JsxEvent.Mouse.t => unit,\n onDragExit?: JsxEvent.Mouse.t => unit,\n onDragExitCapture?: JsxEvent.Mouse.t => unit,\n onDragLeave?: JsxEvent.Mouse.t => unit,\n onDragLeaveCapture?: JsxEvent.Mouse.t => unit,\n onDragOver?: JsxEvent.Mouse.t => unit,\n onDragOverCapture?: JsxEvent.Mouse.t => unit,\n onDragStart?: JsxEvent.Mouse.t => unit,\n onDragStartCapture?: JsxEvent.Mouse.t => unit,\n onDrop?: JsxEvent.Mouse.t => unit,\n onDropCapture?: JsxEvent.Mouse.t => unit,\n onMouseDown?: JsxEvent.Mouse.t => unit,\n onMouseDownCapture?: JsxEvent.Mouse.t => unit,\n onMouseEnter?: JsxEvent.Mouse.t => unit,\n onMouseLeave?: JsxEvent.Mouse.t => unit,\n onMouseMove?: JsxEvent.Mouse.t => unit,\n onMouseMoveCapture?: JsxEvent.Mouse.t => unit,\n onMouseOut?: JsxEvent.Mouse.t => unit,\n onMouseOutCapture?: JsxEvent.Mouse.t => unit,\n onMouseOver?: JsxEvent.Mouse.t => unit,\n onMouseOverCapture?: JsxEvent.Mouse.t => unit,\n onMouseUp?: JsxEvent.Mouse.t => unit,\n onMouseUpCapture?: JsxEvent.Mouse.t => unit,\n onSelect?: JsxEvent.Selection.t => unit,\n onSelectCapture?: JsxEvent.Selection.t => unit,\n onTouchCancel?: JsxEvent.Touch.t => unit,\n onTouchCancelCapture?: JsxEvent.Touch.t => unit,\n onTouchEnd?: JsxEvent.Touch.t => unit,\n onTouchEndCapture?: JsxEvent.Touch.t => unit,\n onTouchMove?: JsxEvent.Touch.t => unit,\n onTouchMoveCapture?: JsxEvent.Touch.t => unit,\n onTouchStart?: JsxEvent.Touch.t => unit,\n onTouchStartCapture?: JsxEvent.Touch.t => unit,\n onPointerOver?: JsxEvent.Pointer.t => unit,\n onPointerOverCapture?: JsxEvent.Pointer.t => unit,\n onPointerEnter?: JsxEvent.Pointer.t => unit,\n onPointerDown?: JsxEvent.Pointer.t => unit,\n onPointerDownCapture?: JsxEvent.Pointer.t => unit,\n onPointerMove?: JsxEvent.Pointer.t => unit,\n onPointerMoveCapture?: JsxEvent.Pointer.t => unit,\n onPointerUp?: JsxEvent.Pointer.t => unit,\n onPointerUpCapture?: JsxEvent.Pointer.t => unit,\n onPointerCancel?: JsxEvent.Pointer.t => unit,\n onPointerCancelCapture?: JsxEvent.Pointer.t => unit,\n onPointerOut?: JsxEvent.Pointer.t => unit,\n onPointerOutCapture?: JsxEvent.Pointer.t => unit,\n onPointerLeave?: JsxEvent.Pointer.t => unit,\n onGotPointerCapture?: JsxEvent.Pointer.t => unit,\n onGotPointerCaptureCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCaptureCapture?: JsxEvent.Pointer.t => unit,\n onScroll?: JsxEvent.UI.t => unit,\n onScrollCapture?: JsxEvent.UI.t => unit,\n onScrollEnd?: JsxEvent.UI.t => unit,\n onScrollEndCapture?: JsxEvent.UI.t => unit,\n onWheel?: JsxEvent.Wheel.t => unit,\n onWheelCapture?: JsxEvent.Wheel.t => unit,\n onAbort?: JsxEvent.Media.t => unit,\n onAbortCapture?: JsxEvent.Media.t => unit,\n onCanPlay?: JsxEvent.Media.t => unit,\n onCanPlayCapture?: JsxEvent.Media.t => unit,\n onCanPlayThrough?: JsxEvent.Media.t => unit,\n onCanPlayThroughCapture?: JsxEvent.Media.t => unit,\n onDurationChange?: JsxEvent.Media.t => unit,\n onDurationChangeCapture?: JsxEvent.Media.t => unit,\n onEmptied?: JsxEvent.Media.t => unit,\n onEmptiedCapture?: JsxEvent.Media.t => unit,\n onEncrypted?: JsxEvent.Media.t => unit,\n onEncryptedCapture?: JsxEvent.Media.t => unit,\n onEnded?: JsxEvent.Media.t => unit,\n onEndedCapture?: JsxEvent.Media.t => unit,\n onError?: JsxEvent.Media.t => unit,\n onErrorCapture?: JsxEvent.Media.t => unit,\n onLoadedData?: JsxEvent.Media.t => unit,\n onLoadedDataCapture?: JsxEvent.Media.t => unit,\n onLoadedMetadata?: JsxEvent.Media.t => unit,\n onLoadedMetadataCapture?: JsxEvent.Media.t => unit,\n onLoadStart?: JsxEvent.Media.t => unit,\n onLoadStartCapture?: JsxEvent.Media.t => unit,\n onPause?: JsxEvent.Media.t => unit,\n onPauseCapture?: JsxEvent.Media.t => unit,\n onPlay?: JsxEvent.Media.t => unit,\n onPlayCapture?: JsxEvent.Media.t => unit,\n onPlaying?: JsxEvent.Media.t => unit,\n onPlayingCapture?: JsxEvent.Media.t => unit,\n onProgress?: JsxEvent.Media.t => unit,\n onProgressCapture?: JsxEvent.Media.t => unit,\n onRateChange?: JsxEvent.Media.t => unit,\n onRateChangeCapture?: JsxEvent.Media.t => unit,\n onResize?: JsxEvent.Media.t => unit,\n onResizeCapture?: JsxEvent.Media.t => unit,\n onSeeked?: JsxEvent.Media.t => unit,\n onSeekedCapture?: JsxEvent.Media.t => unit,\n onSeeking?: JsxEvent.Media.t => unit,\n onSeekingCapture?: JsxEvent.Media.t => unit,\n onStalled?: JsxEvent.Media.t => unit,\n onStalledCapture?: JsxEvent.Media.t => unit,\n onSuspend?: JsxEvent.Media.t => unit,\n onSuspendCapture?: JsxEvent.Media.t => unit,\n onTimeUpdate?: JsxEvent.Media.t => unit,\n onTimeUpdateCapture?: JsxEvent.Media.t => unit,\n onVolumeChange?: JsxEvent.Media.t => unit,\n onVolumeChangeCapture?: JsxEvent.Media.t => unit,\n onWaiting?: JsxEvent.Media.t => unit,\n onWaitingCapture?: JsxEvent.Media.t => unit,\n onLoad?: JsxEvent.Image.t => unit,\n onLoadCapture?: JsxEvent.Image.t => unit,\n onAnimationStart?: JsxEvent.Animation.t => unit,\n onAnimationStartCapture?: JsxEvent.Animation.t => unit,\n onAnimationEnd?: JsxEvent.Animation.t => unit,\n onAnimationEndCapture?: JsxEvent.Animation.t => unit,\n onAnimationIteration?: JsxEvent.Animation.t => unit,\n onAnimationIterationCapture?: JsxEvent.Animation.t => unit,\n onTransitionCancel?: JsxEvent.Transition.t => unit,\n onTransitionCancelCapture?: JsxEvent.Transition.t => unit,\n onTransitionRun?: JsxEvent.Transition.t => unit,\n onTransitionRunCapture?: JsxEvent.Transition.t => unit,\n onTransitionStart?: JsxEvent.Transition.t => unit,\n onTransitionStartCapture?: JsxEvent.Transition.t => unit,\n onTransitionEnd?: JsxEvent.Transition.t => unit,\n onTransitionEndCapture?: JsxEvent.Transition.t => unit,\n accentHeight?: string,\n accumulate?: string,\n additive?: string,\n alignmentBaseline?: string,\n allowReorder?: string,\n alphabetic?: string,\n amplitude?: string,\n arabicForm?: string,\n ascent?: string,\n attributeName?: string,\n attributeType?: string,\n autoReverse?: string,\n azimuth?: string,\n baseFrequency?: string,\n baseProfile?: string,\n baselineShift?: string,\n bbox?: string,\n begin?: string,\n bias?: string,\n by?: string,\n calcMode?: string,\n capHeight?: string,\n clip?: string,\n clipPath?: string,\n clipPathUnits?: string,\n clipRule?: string,\n colorInterpolation?: string,\n colorInterpolationFilters?: string,\n colorProfile?: string,\n colorRendering?: string,\n contentScriptType?: string,\n contentStyleType?: string,\n cursor?: string,\n cx?: string,\n cy?: string,\n d?: string,\n decelerate?: string,\n descent?: string,\n diffuseConstant?: string,\n direction?: string,\n display?: string,\n divisor?: string,\n dominantBaseline?: string,\n dur?: string,\n dx?: string,\n dy?: string,\n edgeMode?: string,\n elevation?: string,\n enableBackground?: string,\n end?: string,\n exponent?: string,\n externalResourcesRequired?: string,\n fill?: string,\n fillOpacity?: string,\n fillRule?: string,\n filter?: string,\n filterRes?: string,\n filterUnits?: string,\n floodColor?: string,\n floodOpacity?: string,\n focusable?: string,\n fontFamily?: string,\n fontSize?: string,\n fontSizeAdjust?: string,\n fontStretch?: string,\n fontStyle?: string,\n fontVariant?: string,\n fontWeight?: string,\n fomat?: string,\n from?: string,\n fx?: string,\n fy?: string,\n g1?: string,\n g2?: string,\n glyphName?: string,\n glyphOrientationHorizontal?: string,\n glyphOrientationVertical?: string,\n glyphRef?: string,\n gradientTransform?: string,\n gradientUnits?: string,\n hanging?: string,\n horizAdvX?: string,\n horizOriginX?: string,\n ideographic?: string,\n imageRendering?: string,\n @as(\"in\") in_?: string,\n in2?: string,\n intercept?: string,\n k?: string,\n k1?: string,\n k2?: string,\n k3?: string,\n k4?: string,\n kernelMatrix?: string,\n kernelUnitLength?: string,\n kerning?: string,\n keyPoints?: string,\n keySplines?: string,\n keyTimes?: string,\n lengthAdjust?: string,\n letterSpacing?: string,\n lightingColor?: string,\n limitingConeAngle?: string,\n local?: string,\n markerEnd?: string,\n markerHeight?: string,\n markerMid?: string,\n markerStart?: string,\n markerUnits?: string,\n markerWidth?: string,\n mask?: string,\n maskContentUnits?: string,\n maskUnits?: string,\n mathematical?: string,\n mode?: string,\n numOctaves?: string,\n offset?: string,\n opacity?: string,\n operator?: string,\n order?: string,\n orient?: string,\n orientation?: string,\n origin?: string,\n overflow?: string,\n overflowX?: string,\n overflowY?: string,\n overlinePosition?: string,\n overlineThickness?: string,\n paintOrder?: string,\n panose1?: string,\n pathLength?: string,\n patternContentUnits?: string,\n patternTransform?: string,\n patternUnits?: string,\n pointerEvents?: string,\n points?: string,\n pointsAtX?: string,\n pointsAtY?: string,\n pointsAtZ?: string,\n preserveAlpha?: string,\n preserveAspectRatio?: string,\n primitiveUnits?: string,\n r?: string,\n radius?: string,\n referrerPolicy?: string,\n refX?: string,\n refY?: string,\n renderingIntent?: string,\n repeatCount?: string,\n repeatDur?: string,\n requiredExtensions?: string,\n requiredFeatures?: string,\n restart?: string,\n result?: string,\n rotate?: string,\n rx?: string,\n ry?: string,\n scale?: string,\n seed?: string,\n shapeRendering?: string,\n slope?: string,\n slot?: string,\n spacing?: string,\n specularConstant?: string,\n specularExponent?: string,\n speed?: string,\n spreadMethod?: string,\n startOffset?: string,\n stdDeviation?: string,\n stemh?: string,\n stemv?: string,\n stitchTiles?: string,\n stopColor?: string,\n stopOpacity?: string,\n strikethroughPosition?: string,\n strikethroughThickness?: string,\n string?: string,\n stroke?: string,\n strokeDasharray?: string,\n strokeDashoffset?: string,\n strokeLinecap?: string,\n strokeLinejoin?: string,\n strokeMiterlimit?: string,\n strokeOpacity?: string,\n strokeWidth?: string,\n surfaceScale?: string,\n systemLanguage?: string,\n tableValues?: string,\n targetX?: string,\n targetY?: string,\n textAnchor?: string,\n textDecoration?: string,\n textLength?: string,\n textRendering?: string,\n to?: string,\n transform?: string,\n u1?: string,\n u2?: string,\n underlinePosition?: string,\n underlineThickness?: string,\n unicode?: string,\n unicodeBidi?: string,\n unicodeRange?: string,\n unitsPerEm?: string,\n vAlphabetic?: string,\n vHanging?: string,\n vIdeographic?: string,\n vMathematical?: string,\n values?: string,\n vectorEffect?: string,\n version?: string,\n vertAdvX?: string,\n vertAdvY?: string,\n vertOriginX?: string,\n vertOriginY?: string,\n viewBox?: string,\n viewTarget?: string,\n visibility?: string,\n widths?: string,\n wordSpacing?: string,\n writingMode?: string,\n x?: string,\n x1?: string,\n x2?: string,\n xChannelSelector?: string,\n xHeight?: string,\n xlinkActuate?: string,\n xlinkArcrole?: string,\n xlinkHref?: string,\n xlinkRole?: string,\n xlinkShow?: string,\n xlinkTitle?: string,\n xlinkType?: string,\n xmlns?: string,\n xmlnsXlink?: string,\n xmlBase?: string,\n xmlLang?: string,\n xmlSpace?: string,\n y?: string,\n y1?: string,\n y2?: string,\n yChannelSelector?: string,\n z?: string,\n zoomAndPan?: string,\n about?: string,\n datatype?: string,\n inlist?: string,\n prefix?: string,\n property?: string,\n resource?: string,\n typeof?: string,\n vocab?: string,\n dangerouslySetInnerHTML?: {\"__html\": string},\n suppressContentEditableWarning?: bool,\n}\n```\nGo to: [Type definition](JsxDOM.res#L23,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype Jsx.element\n```\nGo to: [Type definition](Jsx.res#L8,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype domRef\n```\nGo to: [Type definition](JsxDOM.res#L8,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype popover =\n | @as(\"auto\") Auto\n | @as(\"manual\") Manual\n | @as(\"hint\") Hint\n```\nGo to: [Type definition](JsxDOM.res#L13,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype popoverTargetAction =\n | @as(\"toggle\") Toggle\n | @as(\"show\") Show\n | @as(\"hide\") Hide\n```\nGo to: [Type definition](JsxDOM.res#L18,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype style = JsxDOMStyle.t\n```\nGo to: [Type definition](JsxDOM.res#L7,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Synthetic.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L43,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Toggle.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L302,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Clipboard.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L78,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Composition.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L88,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Keyboard.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L97,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Focus.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L119,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Form.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L129,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Mouse.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L136,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Selection.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L213,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Touch.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L220,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Pointer.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L165,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.UI.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L243,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Wheel.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L254,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Media.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L266,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Image.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L273,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Animation.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L280,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Transition.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L291,3)\n" + "value": "```rescript\nJsxDOM.domProps\n```\n\n---\n\n```\n \n```\n```rescript\ntype JsxDOM.domProps = {\n key?: string,\n children?: Jsx.element,\n ref?: domRef,\n allow?: string,\n @as(\"aria-current\") ariaCurrent?: [\n | #date\n | #\"false\"\n | #location\n | #page\n | #step\n | #time\n | #\"true\"\n ],\n @as(\"aria-details\") ariaDetails?: string,\n @as(\"aria-disabled\") ariaDisabled?: bool,\n @as(\"aria-hidden\") ariaHidden?: bool,\n @as(\"aria-invalid\") ariaInvalid?: [\n | #\"false\"\n | #grammar\n | #spelling\n | #\"true\"\n ],\n @as(\"aria-keyshortcuts\") ariaKeyshortcuts?: string,\n @as(\"aria-label\") ariaLabel?: string,\n @as(\"aria-roledescription\") ariaRoledescription?: string,\n @as(\"aria-autocomplete\") ariaAutocomplete?: [\n | #both\n | #inline\n | #list\n | #none\n ],\n @as(\"aria-checked\") ariaChecked?: [\n | #\"false\"\n | #mixed\n | #\"true\"\n ],\n @as(\"aria-expanded\") ariaExpanded?: bool,\n @as(\"aria-haspopup\") ariaHaspopup?: [\n | #dialog\n | #\"false\"\n | #grid\n | #listbox\n | #menu\n | #tree\n | #\"true\"\n ],\n @as(\"aria-level\") ariaLevel?: int,\n @as(\"aria-modal\") ariaModal?: bool,\n @as(\"aria-multiline\") ariaMultiline?: bool,\n @as(\"aria-multiselectable\") ariaMultiselectable?: bool,\n @as(\"aria-orientation\") ariaOrientation?: [\n | #horizontal\n | #undefined\n | #vertical\n ],\n @as(\"aria-placeholder\") ariaPlaceholder?: string,\n @as(\"aria-pressed\") ariaPressed?: [\n | #\"false\"\n | #mixed\n | #\"true\"\n ],\n @as(\"aria-readonly\") ariaReadonly?: bool,\n @as(\"aria-required\") ariaRequired?: bool,\n @as(\"aria-selected\") ariaSelected?: bool,\n @as(\"aria-sort\") ariaSort?: string,\n @as(\"aria-valuemax\") ariaValuemax?: float,\n @as(\"aria-valuemin\") ariaValuemin?: float,\n @as(\"aria-valuenow\") ariaValuenow?: float,\n @as(\"aria-valuetext\") ariaValuetext?: string,\n @as(\"aria-atomic\") ariaAtomic?: bool,\n @as(\"aria-busy\") ariaBusy?: bool,\n @as(\"aria-live\") ariaLive?: [\n | #assertive\n | #off\n | #polite\n | #rude\n ],\n @as(\"aria-relevant\") ariaRelevant?: string,\n @as(\"aria-dropeffect\") ariaDropeffect?: [\n | #copy\n | #execute\n | #link\n | #move\n | #none\n | #popup\n ],\n @as(\"aria-grabbed\") ariaGrabbed?: bool,\n @as(\"aria-activedescendant\") ariaActivedescendant?: string,\n @as(\"aria-colcount\") ariaColcount?: int,\n @as(\"aria-colindex\") ariaColindex?: int,\n @as(\"aria-colspan\") ariaColspan?: int,\n @as(\"aria-controls\") ariaControls?: string,\n @as(\"aria-describedby\") ariaDescribedby?: string,\n @as(\"aria-errormessage\") ariaErrormessage?: string,\n @as(\"aria-flowto\") ariaFlowto?: string,\n @as(\"aria-labelledby\") ariaLabelledby?: string,\n @as(\"aria-owns\") ariaOwns?: string,\n @as(\"aria-posinset\") ariaPosinset?: int,\n @as(\"aria-rowcount\") ariaRowcount?: int,\n @as(\"aria-rowindex\") ariaRowindex?: int,\n @as(\"aria-rowspan\") ariaRowspan?: int,\n @as(\"aria-setsize\") ariaSetsize?: int,\n defaultChecked?: bool,\n defaultValue?: string,\n accessKey?: string,\n capture?: [#environment | #user],\n className?: string,\n contentEditable?: bool,\n contextMenu?: string,\n @as(\"data-testid\") dataTestId?: string,\n dir?: string,\n draggable?: bool,\n hidden?: bool,\n id?: string,\n inert?: bool,\n lang?: string,\n popover?: popover,\n popoverTarget?: string,\n popoverTargetAction?: popoverTargetAction,\n role?: string,\n style?: style,\n spellCheck?: bool,\n tabIndex?: int,\n title?: string,\n itemID?: string,\n itemProp?: string,\n itemRef?: string,\n itemScope?: bool,\n itemType?: string,\n accept?: string,\n acceptCharset?: string,\n action?: string,\n allowFullScreen?: bool,\n alt?: string,\n @as(\"as\") as_?: string,\n async?: bool,\n autoComplete?: string,\n autoCapitalize?: string,\n autoFocus?: bool,\n autoPlay?: bool,\n challenge?: string,\n charSet?: string,\n checked?: bool,\n cite?: string,\n crossOrigin?: string,\n cols?: int,\n colSpan?: int,\n content?: string,\n controls?: bool,\n coords?: string,\n data?: string,\n dateTime?: string,\n default?: bool,\n defer?: bool,\n disabled?: bool,\n download?: string,\n encType?: string,\n form?: string,\n formAction?: string,\n formTarget?: string,\n formMethod?: string,\n frameBorder?: int,\n headers?: string,\n height?: string,\n high?: int,\n href?: string,\n hrefLang?: string,\n htmlFor?: string,\n httpEquiv?: string,\n icon?: string,\n inputMode?: string,\n integrity?: string,\n keyType?: string,\n kind?: string,\n label?: string,\n list?: string,\n loading?: [#eager | #lazy],\n loop?: bool,\n low?: int,\n manifest?: string,\n max?: string,\n maxLength?: int,\n media?: string,\n mediaGroup?: string,\n method?: string,\n min?: string,\n minLength?: int,\n multiple?: bool,\n muted?: bool,\n name?: string,\n nonce?: string,\n noValidate?: bool,\n @as(\"open\") open_?: bool,\n optimum?: int,\n pattern?: string,\n placeholder?: string,\n playsInline?: bool,\n poster?: string,\n preload?: string,\n radioGroup?: string,\n readOnly?: bool,\n rel?: string,\n required?: bool,\n reversed?: bool,\n rows?: int,\n rowSpan?: int,\n sandbox?: string,\n scope?: string,\n scoped?: bool,\n scrolling?: string,\n selected?: bool,\n shape?: string,\n size?: int,\n sizes?: string,\n span?: int,\n src?: string,\n srcDoc?: string,\n srcLang?: string,\n srcSet?: string,\n start?: int,\n step?: float,\n summary?: string,\n target?: string,\n @as(\"type\") type_?: string,\n useMap?: string,\n value?: string,\n width?: string,\n wrap?: string,\n onCancel?: JsxEvent.Synthetic.t => unit,\n onCancelCapture?: JsxEvent.Synthetic.t => unit,\n onClose?: JsxEvent.Synthetic.t => unit,\n onCloseCapture?: JsxEvent.Synthetic.t => unit,\n onFullscreenChange?: JsxEvent.Synthetic.t => unit,\n onFullscreenChangeCapture?: JsxEvent.Synthetic.t => unit,\n onFullscreenError?: JsxEvent.Synthetic.t => unit,\n onFullscreenErrorCapture?: JsxEvent.Synthetic.t => unit,\n onBeforeToggle?: JsxEvent.Toggle.t => unit,\n onBeforeToggleCapture?: JsxEvent.Toggle.t => unit,\n onToggle?: JsxEvent.Toggle.t => unit,\n onToggleCapture?: JsxEvent.Toggle.t => unit,\n onCopy?: JsxEvent.Clipboard.t => unit,\n onCopyCapture?: JsxEvent.Clipboard.t => unit,\n onCut?: JsxEvent.Clipboard.t => unit,\n onCutCapture?: JsxEvent.Clipboard.t => unit,\n onPaste?: JsxEvent.Clipboard.t => unit,\n onPasteCapture?: JsxEvent.Clipboard.t => unit,\n onCompositionEnd?: JsxEvent.Composition.t => unit,\n onCompositionEndCapture?: JsxEvent.Composition.t => unit,\n onCompositionStart?: JsxEvent.Composition.t => unit,\n onCompositionStartCapture?: JsxEvent.Composition.t => unit,\n onCompositionUpdate?: JsxEvent.Composition.t => unit,\n onCompositionUpdateCapture?: JsxEvent.Composition.t => unit,\n onKeyDown?: JsxEvent.Keyboard.t => unit,\n onKeyDownCapture?: JsxEvent.Keyboard.t => unit,\n onKeyPress?: JsxEvent.Keyboard.t => unit,\n onKeyPressCapture?: JsxEvent.Keyboard.t => unit,\n onKeyUp?: JsxEvent.Keyboard.t => unit,\n onKeyUpCapture?: JsxEvent.Keyboard.t => unit,\n onFocus?: JsxEvent.Focus.t => unit,\n onFocusCapture?: JsxEvent.Focus.t => unit,\n onBlur?: JsxEvent.Focus.t => unit,\n onBlurCapture?: JsxEvent.Focus.t => unit,\n onBeforeInput?: JsxEvent.Form.t => unit,\n onBeforeInputCapture?: JsxEvent.Form.t => unit,\n onChange?: JsxEvent.Form.t => unit,\n onChangeCapture?: JsxEvent.Form.t => unit,\n onInput?: JsxEvent.Form.t => unit,\n onInputCapture?: JsxEvent.Form.t => unit,\n onReset?: JsxEvent.Form.t => unit,\n onResetCapture?: JsxEvent.Form.t => unit,\n onSubmit?: JsxEvent.Form.t => unit,\n onSubmitCapture?: JsxEvent.Form.t => unit,\n onInvalid?: JsxEvent.Form.t => unit,\n onInvalidCapture?: JsxEvent.Form.t => unit,\n onAuxClick?: JsxEvent.Mouse.t => unit,\n onAuxClickCapture?: JsxEvent.Mouse.t => unit,\n onClick?: JsxEvent.Mouse.t => unit,\n onClickCapture?: JsxEvent.Mouse.t => unit,\n onContextMenu?: JsxEvent.Mouse.t => unit,\n onContextMenuCapture?: JsxEvent.Mouse.t => unit,\n onDoubleClick?: JsxEvent.Mouse.t => unit,\n onDoubleClickCapture?: JsxEvent.Mouse.t => unit,\n onDrag?: JsxEvent.Mouse.t => unit,\n onDragCapture?: JsxEvent.Mouse.t => unit,\n onDragEnd?: JsxEvent.Mouse.t => unit,\n onDragEndCapture?: JsxEvent.Mouse.t => unit,\n onDragEnter?: JsxEvent.Mouse.t => unit,\n onDragEnterCapture?: JsxEvent.Mouse.t => unit,\n onDragExit?: JsxEvent.Mouse.t => unit,\n onDragExitCapture?: JsxEvent.Mouse.t => unit,\n onDragLeave?: JsxEvent.Mouse.t => unit,\n onDragLeaveCapture?: JsxEvent.Mouse.t => unit,\n onDragOver?: JsxEvent.Mouse.t => unit,\n onDragOverCapture?: JsxEvent.Mouse.t => unit,\n onDragStart?: JsxEvent.Mouse.t => unit,\n onDragStartCapture?: JsxEvent.Mouse.t => unit,\n onDrop?: JsxEvent.Mouse.t => unit,\n onDropCapture?: JsxEvent.Mouse.t => unit,\n onMouseDown?: JsxEvent.Mouse.t => unit,\n onMouseDownCapture?: JsxEvent.Mouse.t => unit,\n onMouseEnter?: JsxEvent.Mouse.t => unit,\n onMouseLeave?: JsxEvent.Mouse.t => unit,\n onMouseMove?: JsxEvent.Mouse.t => unit,\n onMouseMoveCapture?: JsxEvent.Mouse.t => unit,\n onMouseOut?: JsxEvent.Mouse.t => unit,\n onMouseOutCapture?: JsxEvent.Mouse.t => unit,\n onMouseOver?: JsxEvent.Mouse.t => unit,\n onMouseOverCapture?: JsxEvent.Mouse.t => unit,\n onMouseUp?: JsxEvent.Mouse.t => unit,\n onMouseUpCapture?: JsxEvent.Mouse.t => unit,\n onSelect?: JsxEvent.Selection.t => unit,\n onSelectCapture?: JsxEvent.Selection.t => unit,\n onTouchCancel?: JsxEvent.Touch.t => unit,\n onTouchCancelCapture?: JsxEvent.Touch.t => unit,\n onTouchEnd?: JsxEvent.Touch.t => unit,\n onTouchEndCapture?: JsxEvent.Touch.t => unit,\n onTouchMove?: JsxEvent.Touch.t => unit,\n onTouchMoveCapture?: JsxEvent.Touch.t => unit,\n onTouchStart?: JsxEvent.Touch.t => unit,\n onTouchStartCapture?: JsxEvent.Touch.t => unit,\n onPointerOver?: JsxEvent.Pointer.t => unit,\n onPointerOverCapture?: JsxEvent.Pointer.t => unit,\n onPointerEnter?: JsxEvent.Pointer.t => unit,\n onPointerDown?: JsxEvent.Pointer.t => unit,\n onPointerDownCapture?: JsxEvent.Pointer.t => unit,\n onPointerMove?: JsxEvent.Pointer.t => unit,\n onPointerMoveCapture?: JsxEvent.Pointer.t => unit,\n onPointerUp?: JsxEvent.Pointer.t => unit,\n onPointerUpCapture?: JsxEvent.Pointer.t => unit,\n onPointerCancel?: JsxEvent.Pointer.t => unit,\n onPointerCancelCapture?: JsxEvent.Pointer.t => unit,\n onPointerOut?: JsxEvent.Pointer.t => unit,\n onPointerOutCapture?: JsxEvent.Pointer.t => unit,\n onPointerLeave?: JsxEvent.Pointer.t => unit,\n onGotPointerCapture?: JsxEvent.Pointer.t => unit,\n onGotPointerCaptureCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCapture?: JsxEvent.Pointer.t => unit,\n onLostPointerCaptureCapture?: JsxEvent.Pointer.t => unit,\n onScroll?: JsxEvent.UI.t => unit,\n onScrollCapture?: JsxEvent.UI.t => unit,\n onScrollEnd?: JsxEvent.UI.t => unit,\n onScrollEndCapture?: JsxEvent.UI.t => unit,\n onWheel?: JsxEvent.Wheel.t => unit,\n onWheelCapture?: JsxEvent.Wheel.t => unit,\n onAbort?: JsxEvent.Media.t => unit,\n onAbortCapture?: JsxEvent.Media.t => unit,\n onCanPlay?: JsxEvent.Media.t => unit,\n onCanPlayCapture?: JsxEvent.Media.t => unit,\n onCanPlayThrough?: JsxEvent.Media.t => unit,\n onCanPlayThroughCapture?: JsxEvent.Media.t => unit,\n onDurationChange?: JsxEvent.Media.t => unit,\n onDurationChangeCapture?: JsxEvent.Media.t => unit,\n onEmptied?: JsxEvent.Media.t => unit,\n onEmptiedCapture?: JsxEvent.Media.t => unit,\n onEncrypted?: JsxEvent.Media.t => unit,\n onEncryptedCapture?: JsxEvent.Media.t => unit,\n onEnded?: JsxEvent.Media.t => unit,\n onEndedCapture?: JsxEvent.Media.t => unit,\n onError?: JsxEvent.Media.t => unit,\n onErrorCapture?: JsxEvent.Media.t => unit,\n onLoadedData?: JsxEvent.Media.t => unit,\n onLoadedDataCapture?: JsxEvent.Media.t => unit,\n onLoadedMetadata?: JsxEvent.Media.t => unit,\n onLoadedMetadataCapture?: JsxEvent.Media.t => unit,\n onLoadStart?: JsxEvent.Media.t => unit,\n onLoadStartCapture?: JsxEvent.Media.t => unit,\n onPause?: JsxEvent.Media.t => unit,\n onPauseCapture?: JsxEvent.Media.t => unit,\n onPlay?: JsxEvent.Media.t => unit,\n onPlayCapture?: JsxEvent.Media.t => unit,\n onPlaying?: JsxEvent.Media.t => unit,\n onPlayingCapture?: JsxEvent.Media.t => unit,\n onProgress?: JsxEvent.Media.t => unit,\n onProgressCapture?: JsxEvent.Media.t => unit,\n onRateChange?: JsxEvent.Media.t => unit,\n onRateChangeCapture?: JsxEvent.Media.t => unit,\n onResize?: JsxEvent.Media.t => unit,\n onResizeCapture?: JsxEvent.Media.t => unit,\n onSeeked?: JsxEvent.Media.t => unit,\n onSeekedCapture?: JsxEvent.Media.t => unit,\n onSeeking?: JsxEvent.Media.t => unit,\n onSeekingCapture?: JsxEvent.Media.t => unit,\n onStalled?: JsxEvent.Media.t => unit,\n onStalledCapture?: JsxEvent.Media.t => unit,\n onSuspend?: JsxEvent.Media.t => unit,\n onSuspendCapture?: JsxEvent.Media.t => unit,\n onTimeUpdate?: JsxEvent.Media.t => unit,\n onTimeUpdateCapture?: JsxEvent.Media.t => unit,\n onVolumeChange?: JsxEvent.Media.t => unit,\n onVolumeChangeCapture?: JsxEvent.Media.t => unit,\n onWaiting?: JsxEvent.Media.t => unit,\n onWaitingCapture?: JsxEvent.Media.t => unit,\n onLoad?: JsxEvent.Image.t => unit,\n onLoadCapture?: JsxEvent.Image.t => unit,\n onAnimationStart?: JsxEvent.Animation.t => unit,\n onAnimationStartCapture?: JsxEvent.Animation.t => unit,\n onAnimationEnd?: JsxEvent.Animation.t => unit,\n onAnimationEndCapture?: JsxEvent.Animation.t => unit,\n onAnimationIteration?: JsxEvent.Animation.t => unit,\n onAnimationIterationCapture?: JsxEvent.Animation.t => unit,\n onTransitionCancel?: JsxEvent.Transition.t => unit,\n onTransitionCancelCapture?: JsxEvent.Transition.t => unit,\n onTransitionRun?: JsxEvent.Transition.t => unit,\n onTransitionRunCapture?: JsxEvent.Transition.t => unit,\n onTransitionStart?: JsxEvent.Transition.t => unit,\n onTransitionStartCapture?: JsxEvent.Transition.t => unit,\n onTransitionEnd?: JsxEvent.Transition.t => unit,\n onTransitionEndCapture?: JsxEvent.Transition.t => unit,\n accentHeight?: string,\n accumulate?: string,\n additive?: string,\n alignmentBaseline?: string,\n allowReorder?: string,\n alphabetic?: string,\n amplitude?: string,\n arabicForm?: string,\n ascent?: string,\n attributeName?: string,\n attributeType?: string,\n autoReverse?: string,\n azimuth?: string,\n baseFrequency?: string,\n baseProfile?: string,\n baselineShift?: string,\n bbox?: string,\n begin?: string,\n bias?: string,\n by?: string,\n calcMode?: string,\n capHeight?: string,\n clip?: string,\n clipPath?: string,\n clipPathUnits?: string,\n clipRule?: string,\n colorInterpolation?: string,\n colorInterpolationFilters?: string,\n colorProfile?: string,\n colorRendering?: string,\n contentScriptType?: string,\n contentStyleType?: string,\n cursor?: string,\n cx?: string,\n cy?: string,\n d?: string,\n decelerate?: string,\n descent?: string,\n diffuseConstant?: string,\n direction?: string,\n display?: string,\n divisor?: string,\n dominantBaseline?: string,\n dur?: string,\n dx?: string,\n dy?: string,\n edgeMode?: string,\n elevation?: string,\n enableBackground?: string,\n end?: string,\n exponent?: string,\n externalResourcesRequired?: string,\n fill?: string,\n fillOpacity?: string,\n fillRule?: string,\n filter?: string,\n filterRes?: string,\n filterUnits?: string,\n floodColor?: string,\n floodOpacity?: string,\n focusable?: string,\n fontFamily?: string,\n fontSize?: string,\n fontSizeAdjust?: string,\n fontStretch?: string,\n fontStyle?: string,\n fontVariant?: string,\n fontWeight?: string,\n fomat?: string,\n from?: string,\n fx?: string,\n fy?: string,\n g1?: string,\n g2?: string,\n glyphName?: string,\n glyphOrientationHorizontal?: string,\n glyphOrientationVertical?: string,\n glyphRef?: string,\n gradientTransform?: string,\n gradientUnits?: string,\n hanging?: string,\n horizAdvX?: string,\n horizOriginX?: string,\n ideographic?: string,\n imageRendering?: string,\n @as(\"in\") in_?: string,\n in2?: string,\n intercept?: string,\n k?: string,\n k1?: string,\n k2?: string,\n k3?: string,\n k4?: string,\n kernelMatrix?: string,\n kernelUnitLength?: string,\n kerning?: string,\n keyPoints?: string,\n keySplines?: string,\n keyTimes?: string,\n lengthAdjust?: string,\n letterSpacing?: string,\n lightingColor?: string,\n limitingConeAngle?: string,\n local?: string,\n markerEnd?: string,\n markerHeight?: string,\n markerMid?: string,\n markerStart?: string,\n markerUnits?: string,\n markerWidth?: string,\n mask?: string,\n maskContentUnits?: string,\n maskUnits?: string,\n mathematical?: string,\n mode?: string,\n numOctaves?: string,\n offset?: string,\n opacity?: string,\n operator?: string,\n order?: string,\n orient?: string,\n orientation?: string,\n origin?: string,\n overflow?: string,\n overflowX?: string,\n overflowY?: string,\n overlinePosition?: string,\n overlineThickness?: string,\n paintOrder?: string,\n panose1?: string,\n pathLength?: string,\n patternContentUnits?: string,\n patternTransform?: string,\n patternUnits?: string,\n pointerEvents?: string,\n points?: string,\n pointsAtX?: string,\n pointsAtY?: string,\n pointsAtZ?: string,\n preserveAlpha?: string,\n preserveAspectRatio?: string,\n primitiveUnits?: string,\n r?: string,\n radius?: string,\n referrerPolicy?: string,\n refX?: string,\n refY?: string,\n renderingIntent?: string,\n repeatCount?: string,\n repeatDur?: string,\n requiredExtensions?: string,\n requiredFeatures?: string,\n restart?: string,\n result?: string,\n rotate?: string,\n rx?: string,\n ry?: string,\n scale?: string,\n seed?: string,\n shapeRendering?: string,\n slope?: string,\n slot?: string,\n spacing?: string,\n specularConstant?: string,\n specularExponent?: string,\n speed?: string,\n spreadMethod?: string,\n startOffset?: string,\n stdDeviation?: string,\n stemh?: string,\n stemv?: string,\n stitchTiles?: string,\n stopColor?: string,\n stopOpacity?: string,\n strikethroughPosition?: string,\n strikethroughThickness?: string,\n string?: string,\n stroke?: string,\n strokeDasharray?: string,\n strokeDashoffset?: string,\n strokeLinecap?: string,\n strokeLinejoin?: string,\n strokeMiterlimit?: string,\n strokeOpacity?: string,\n strokeWidth?: string,\n surfaceScale?: string,\n systemLanguage?: string,\n tableValues?: string,\n targetX?: string,\n targetY?: string,\n textAnchor?: string,\n textDecoration?: string,\n textLength?: string,\n textRendering?: string,\n to?: string,\n transform?: string,\n u1?: string,\n u2?: string,\n underlinePosition?: string,\n underlineThickness?: string,\n unicode?: string,\n unicodeBidi?: string,\n unicodeRange?: string,\n unitsPerEm?: string,\n vAlphabetic?: string,\n vHanging?: string,\n vIdeographic?: string,\n vMathematical?: string,\n values?: string,\n vectorEffect?: string,\n version?: string,\n vertAdvX?: string,\n vertAdvY?: string,\n vertOriginX?: string,\n vertOriginY?: string,\n viewBox?: string,\n viewTarget?: string,\n visibility?: string,\n widths?: string,\n wordSpacing?: string,\n writingMode?: string,\n x?: string,\n x1?: string,\n x2?: string,\n xChannelSelector?: string,\n xHeight?: string,\n xlinkActuate?: string,\n xlinkArcrole?: string,\n xlinkHref?: string,\n xlinkRole?: string,\n xlinkShow?: string,\n xlinkTitle?: string,\n xlinkType?: string,\n xmlns?: string,\n xmlnsXlink?: string,\n xmlBase?: string,\n xmlLang?: string,\n xmlSpace?: string,\n y?: string,\n y1?: string,\n y2?: string,\n yChannelSelector?: string,\n z?: string,\n zoomAndPan?: string,\n about?: string,\n datatype?: string,\n inlist?: string,\n prefix?: string,\n property?: string,\n resource?: string,\n typeof?: string,\n vocab?: string,\n dangerouslySetInnerHTML?: {\"__html\": string},\n suppressContentEditableWarning?: bool,\n}\n```\nGo to: [Type definition](JsxDOM.res#L23,1)\n\n\n---\n\n```\n \n```\n```rescript\n@notUndefined type Jsx.element\n```\nGo to: [Type definition](Jsx.res#L8,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype domRef\n```\nGo to: [Type definition](JsxDOM.res#L8,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype popover =\n | @as(\"auto\") Auto\n | @as(\"manual\") Manual\n | @as(\"hint\") Hint\n```\nGo to: [Type definition](JsxDOM.res#L13,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype popoverTargetAction =\n | @as(\"toggle\") Toggle\n | @as(\"show\") Show\n | @as(\"hide\") Hide\n```\nGo to: [Type definition](JsxDOM.res#L18,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype style = JsxDOMStyle.t\n```\nGo to: [Type definition](JsxDOM.res#L7,1)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Synthetic.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L43,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Toggle.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L302,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Clipboard.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L78,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Composition.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L88,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Keyboard.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L97,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Focus.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L119,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Form.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L129,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Mouse.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L136,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Selection.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L213,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Touch.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L220,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Pointer.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L165,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.UI.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L243,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Wheel.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L254,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Media.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L266,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Image.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L273,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Animation.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L280,3)\n\n\n---\n\n```\n \n```\n```rescript\ntype JsxEvent.Transition.t = synthetic\n```\nGo to: [Type definition](JsxEvent.res#L291,3)\n" } } diff --git a/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctor.res.txt b/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctor.res.txt index 3abb4e8fae..9abf6fc019 100644 --- a/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctor.res.txt +++ b/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctor.res.txt @@ -33,4 +33,13 @@ module WithWire: ( module Applied: { type t = {@as("wire") field: int} } +module type Type = { + type t +} +module Tagged: ( + X: Type, +) => +{ + @tag("kind") type wrapped = Value({value: X.t}) | Empty({reason: string}) +} diff --git a/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctorUse.res.txt b/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctorUse.res.txt index 4f61a6e2f5..9b028ba068 100644 --- a/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctorUse.res.txt +++ b/tests/analysis_tests/tests/src/expected/CreateInterfaceFunctorUse.res.txt @@ -5,4 +5,7 @@ module StrSet: { } type t = array let add: (t, float) => array +module IntTagged: { + @tag("kind") type wrapped = Value({value: int}) | Empty({reason: string}) +} diff --git a/tests/build_tests/super_errors/expected/not_undefined_functor_argument.res.expected b/tests/build_tests/super_errors/expected/not_undefined_functor_argument.res.expected index c971c01bd1..f8a8bab9c7 100644 --- a/tests/build_tests/super_errors/expected/not_undefined_functor_argument.res.expected +++ b/tests/build_tests/super_errors/expected/not_undefined_functor_argument.res.expected @@ -15,7 +15,7 @@ type t = option Expected declaration (/.../fixtures/not_undefined_functor_argument.res:3:19-24): - type t + @notUndefined type t Their runtime representations differ: Actual declaration: can hold undefined diff --git a/tests/build_tests/super_errors/expected/not_undefined_functor_parameter.res.expected b/tests/build_tests/super_errors/expected/not_undefined_functor_parameter.res.expected index 0caa1a7f97..685d499f30 100644 --- a/tests/build_tests/super_errors/expected/not_undefined_functor_parameter.res.expected +++ b/tests/build_tests/super_errors/expected/not_undefined_functor_parameter.res.expected @@ -16,7 +16,7 @@ type t = X.t Expected declaration (/.../fixtures/not_undefined_functor_parameter.res:7:19-24): - type t + @notUndefined type t Their runtime representations differ: Actual declaration: can hold undefined diff --git a/tests/build_tests/super_errors/expected/runtime_annotation_interface_over_record.res.expected b/tests/build_tests/super_errors/expected/runtime_annotation_interface_over_record.res.expected index adc91edef2..b7fd9ff037 100644 --- a/tests/build_tests/super_errors/expected/runtime_annotation_interface_over_record.res.expected +++ b/tests/build_tests/super_errors/expected/runtime_annotation_interface_over_record.res.expected @@ -15,7 +15,7 @@ type t = {y: int} Expected declaration (/.../fixtures/runtime_annotation_interface_over_record.res:2:21-26): - type t + @typeOf("string") type t Their runtime representations differ: Actual declaration: typeof "object" diff --git a/tests/build_tests/super_errors/expected/tag_name_escaped.res.expected b/tests/build_tests/super_errors/expected/tag_name_escaped.res.expected new file mode 100644 index 0000000000..0cf6daed64 --- /dev/null +++ b/tests/build_tests/super_errors/expected/tag_name_escaped.res.expected @@ -0,0 +1,20 @@ + + We've found a bug for you! + /.../fixtures/tag_name_escaped.res:5:5-7:1 + + 3 │ module M: { + 4 │ @tag("k\"ind") type t = A({x: int}) | B({y: int}) + 5 │ } = { + 6 │  @tag("typ\\é") type t = A({x: int}) | B({y: int}) + 7 │ } + 8 │ + + Signature mismatch: + + Actual declaration (/.../fixtures/tag_name_escaped.res:6:18-51): + @tag("typ\\é") type t = A({x: int}) | B({y: int}) + + Expected declaration (/.../fixtures/tag_name_escaped.res:4:18-51): + @tag("k\"ind") type t = A({x: int}) | B({y: int}) + + Their @tag annotations differ. \ No newline at end of file diff --git a/tests/build_tests/super_errors/fixtures/tag_name_escaped.res b/tests/build_tests/super_errors/fixtures/tag_name_escaped.res new file mode 100644 index 0000000000..c97eae8934 --- /dev/null +++ b/tests/build_tests/super_errors/fixtures/tag_name_escaped.res @@ -0,0 +1,7 @@ +// A @tag name with a quote, a backslash or non-ASCII letters prints as it is +// written in source +module M: { + @tag("k\"ind") type t = A({x: int}) | B({y: int}) +} = { + @tag("typ\\é") type t = A({x: int}) | B({y: int}) +} diff --git a/tests/build_tests/super_errors_multi/expected/Cross_not_undefined_option_implementation.expected b/tests/build_tests/super_errors_multi/expected/Cross_not_undefined_option_implementation.expected index efdcaf1cbd..c293048f00 100644 --- a/tests/build_tests/super_errors_multi/expected/Cross_not_undefined_option_implementation.expected +++ b/tests/build_tests/super_errors_multi/expected/Cross_not_undefined_option_implementation.expected @@ -14,7 +14,7 @@ type t = option Expected declaration (/.../fixtures/Cross_not_undefined_option_implementation/Hidden.resi:1:15-20): - type t + @notUndefined type t Their runtime representations differ: Actual declaration: can hold undefined diff --git a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_claimed_by_interface.expected b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_claimed_by_interface.expected index 98af76b738..453952ee3c 100644 --- a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_claimed_by_interface.expected +++ b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_claimed_by_interface.expected @@ -13,7 +13,7 @@ type t = option Expected declaration (/.../fixtures/Cross_runtime_annotation_claimed_by_interface/Claim.resi:1:19-24): - type t + @typeOf("string") type t Their runtime representations differ: Actual declaration: no stated class or typeof diff --git a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_functor_argument.expected b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_functor_argument.expected index b5a64b4b2d..ad1ab60868 100644 --- a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_functor_argument.expected +++ b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_functor_argument.expected @@ -11,10 +11,10 @@ Signature mismatch: Actual declaration (/.../fixtures/Cross_runtime_annotation_functor_argument/A_classes.res:2:20-44): - type dog = A_classes.dog + @instanceOf("Dog") type dog = A_classes.dog Expected declaration (/.../fixtures/Cross_runtime_annotation_functor_argument/B_user.res:4:24-31): - type dog + @instanceOf("Dog") type dog Their runtime representations differ: Actual declaration: instances of Dog, a subclass of Animal diff --git a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_base.expected b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_base.expected index 88c413dbf4..3fb327412d 100644 --- a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_base.expected +++ b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_base.expected @@ -11,11 +11,11 @@ does not match the interface /.../fixtures/Cross_runtime_annotation_hidden_base/classes.cmi: Actual declaration (/.../fixtures/Cross_runtime_annotation_hidden_base/Classes.res:2:20-44): - type dog = private animal + @instanceOf("Dog") type dog = private animal Expected declaration (/.../fixtures/Cross_runtime_annotation_hidden_base/Classes.resi:2:20-44): - type dog = private animal + @instanceOf("Dog") type dog = private animal - Their runtime representations differ: + The declarations read the same, but a type they mention differs: Actual declaration: instances of Dog, a subclass of Animal Expected declaration: instances of Dog \ No newline at end of file diff --git a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_superclass.expected b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_superclass.expected index a45f58ed70..ec5915ad10 100644 --- a/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_superclass.expected +++ b/tests/build_tests/super_errors_multi/expected/Cross_runtime_annotation_hidden_superclass.expected @@ -11,10 +11,10 @@ does not match the interface /.../fixtures/Cross_runtime_annotation_hidden_superclass/classes.cmi: Actual declaration (/.../fixtures/Cross_runtime_annotation_hidden_superclass/Classes.res:2:20-44): - type dog = private animal + @instanceOf("Dog") type dog = private animal Expected declaration (/.../fixtures/Cross_runtime_annotation_hidden_superclass/Classes.resi:2:20-27): - type dog + @instanceOf("Dog") type dog Their runtime representations differ: Actual declaration: instances of Dog, a subclass of Animal diff --git a/tests/build_tests/super_errors_multi/expected/Iface_tag_name_mismatch.expected b/tests/build_tests/super_errors_multi/expected/Iface_tag_name_mismatch.expected index 16821fcba1..8a45f6b020 100644 --- a/tests/build_tests/super_errors_multi/expected/Iface_tag_name_mismatch.expected +++ b/tests/build_tests/super_errors_multi/expected/Iface_tag_name_mismatch.expected @@ -13,9 +13,9 @@ does not match the interface /.../fixtures/Iface_tag_name_mismatch/foo.cmi: Actual declaration (/.../fixtures/Iface_tag_name_mismatch/Foo.res:2:1-4:5): - type t = @as("a") A | B + @tag("type") type t = @as("a") A | B Expected declaration (/.../fixtures/Iface_tag_name_mismatch/Foo.resi:2:1-4:5): - type t = @as("a") A | B + @tag("kind") type t = @as("a") A | B Their @tag annotations differ. \ No newline at end of file