mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
prettier
This commit is contained in:
2
flow-typed/qs.js
vendored
2
flow-typed/qs.js
vendored
@@ -1,5 +1,5 @@
|
||||
declare module 'qs' {
|
||||
declare module.exports: {
|
||||
parse: (str: string, opts: Object) => Object;
|
||||
parse: (str: string, opts: Object) => Object,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,7 +41,9 @@ function urlify(str: string): Node {
|
||||
|
||||
// `?invariant=123&args[]=foo&args[]=bar`
|
||||
// or `// ?invariant=123&args[0]=foo&args[1]=bar`
|
||||
function parseQueryString(search: string): ?{code: string, args: Array<string>} {
|
||||
function parseQueryString(
|
||||
search: string,
|
||||
): ?{|code: string, args: Array<string>|} {
|
||||
const qsResult = qs.parse(search, {ignoreQueryPrefix: true});
|
||||
if (!qsResult.invariant) {
|
||||
return null;
|
||||
@@ -52,7 +54,7 @@ function parseQueryString(search: string): ?{code: string, args: Array<string>}
|
||||
};
|
||||
}
|
||||
|
||||
function ErrorResult(props: {code: ?string, msg: string}) {
|
||||
function ErrorResult(props: {|code: ?string, msg: string|}) {
|
||||
const code = props.code;
|
||||
const errorMsg = props.msg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user