Skip to content

Tests: use rescript-react 0.11.0-alpha.1 #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions analysis/tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion analysis/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"private": true,
"devDependencies": {
"@rescript/react": "^0.10.3"
"@rescript/react": "^0.11.0-alpha.1"
},
"dependencies": {
"rescript": "^10.1.0-rc.2"
Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Div.res.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Hover src/Div.res 0:10
getLocItem #3: heuristic for <div>
{"contents": "```rescript\n(\n string,\n ~props: ReactDOMRe.domProps=?,\n array<React.element>,\n) => React.element\n```\n\n\n```\n \n```\n```rescript\ntype ReactDOMRe.domProps = ReactDOM.Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOMRe.res%22%2C57%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"}
{"contents": "```rescript\n(\n string,\n ~props: ReactDOMRe.domProps=?,\n array<React.element>,\n) => React.element\n```\n\n\n```\n \n```\n```rescript\ntype ReactDOMRe.domProps = ReactDOM.Props.domProps\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22ReactDOMRe.res%22%2C57%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"}

Complete src/Div.res 3:17
posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:4->3:17]
Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Fragment.res.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hover src/Fragment.res 6:19
getLocItem #4: heuristic for </Comp> within fragments: take make as makeProps does not work
the type is not great but jump to definition works
{"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n\n```\n \n```\n```rescript\ntype React.component<'props> = componentLike<\n 'props,\n element,\n>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n---\n"}
{"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n---\n"}

Hover src/Fragment.res 9:56
Nothing at that position. Now trying to use completion.
Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Hover.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Completable: Cpath Value[y2].content.""
}]

Hover src/Hover.res 197:4
{"contents": "```rescript\nCompV4.props<int, string> => React.element\n```\n\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"}
{"contents": "```rescript\nCompV4.props<int, string> => React.element\n```\n\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n\n---\n"}

Hover src/Hover.res 202:16
{"contents": "```rescript\nuseR\n```\n\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list<option<r<float>>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n\n---\n"}
Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Jsx2.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Completable: Cpath Type[React, e]
"label": "element",
"kind": 22,
"tags": [],
"detail": "type element",
"detail": "type element = Jsx.element",
"documentation": null
}]

Expand Down
4 changes: 2 additions & 2 deletions analysis/tests/src/expected/Jsx2.resi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Completable: Cpath Type[React, e]
"label": "element",
"kind": 22,
"tags": [],
"detail": "type element",
"detail": "type element = Jsx.element",
"documentation": null
}]

Expand All @@ -26,7 +26,7 @@ Completable: Cpath Type[React, e]
"label": "element",
"kind": 22,
"tags": [],
"detail": "type element",
"detail": "type element = Jsx.element",
"documentation": null
}]