diff --git a/packages/url/CHANGELOG.md b/packages/url/CHANGELOG.md index 177d4fd1c8eda2..5bf991fdb09c73 100644 --- a/packages/url/CHANGELOG.md +++ b/packages/url/CHANGELOG.md @@ -1,5 +1,9 @@ ## Master +### Bug fix + +- `addQueryArgs` arguments are optional ([#21926](https://github.com/WordPress/gutenberg/pull/21926)) + ## 2.13.0 (2020-04-15) ### New feature diff --git a/packages/url/README.md b/packages/url/README.md index d2b66ef4c71cb6..87c21efa4ed0c8 100644 --- a/packages/url/README.md +++ b/packages/url/README.md @@ -31,7 +31,7 @@ const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://g _Parameters_ - _url_ `[string]`: URL to which arguments should be appended. If omitted, only the resulting querystring is returned. -- _args_ `Object`: Query arguments to apply to URL. +- _args_ `[Object]`: Query arguments to apply to URL. _Returns_ diff --git a/packages/url/src/add-query-args.js b/packages/url/src/add-query-args.js index 9a1add3af409be..2d48c0be5a06b8 100644 --- a/packages/url/src/add-query-args.js +++ b/packages/url/src/add-query-args.js @@ -10,7 +10,7 @@ import { parse, stringify } from 'qs'; * * @param {string} [url=''] URL to which arguments should be appended. If omitted, * only the resulting querystring is returned. - * @param {Object} args Query arguments to apply to URL. + * @param {Object} [args] Query arguments to apply to URL. * * @example * ```js diff --git a/packages/url/tsconfig.json b/packages/url/tsconfig.json index 70efdfe49990d5..3c2c31f506f132 100644 --- a/packages/url/tsconfig.json +++ b/packages/url/tsconfig.json @@ -2,10 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", - "declarationDir": "build-types", - - // This is required because the `react-native-url-polyfill` dependency lacks types - "noImplicitAny": false + "declarationDir": "build-types" }, "include": [ "src/**/*" ] }