暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

query.d.ts 1.2KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @license
  3. * Copyright 2017 Google LLC
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /**
  18. * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a
  19. * params object (e.g. {arg: 'val', arg2: 'val2'})
  20. * Note: You must prepend it with ? when adding it to a URL.
  21. */
  22. export declare function querystring(querystringParams: {
  23. [key: string]: string | number;
  24. }): string;
  25. /**
  26. * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object
  27. * (e.g. {arg: 'val', arg2: 'val2'})
  28. */
  29. export declare function querystringDecode(querystring: string): Record<string, string>;
  30. /**
  31. * Extract the query string part of a URL, including the leading question mark (if present).
  32. */
  33. export declare function extractQuerystring(url: string): string;