Skip to content

Commit

Permalink
deprecated: Add DeprecatedOptions export to align with DT definitions (
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Apr 12, 2021
1 parent 27f9359 commit 719d575
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/deprecated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ message is only logged once.

_Type_

- `Record<string,true|undefined>`
- `Record<string, true | undefined>`


<!-- END TOKEN(Autogenerated API docs) -->
Expand Down
4 changes: 3 additions & 1 deletion packages/deprecated/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { doAction } from '@wordpress/hooks';
* Object map tracking messages which have been logged, for use in ensuring a
* message is only logged once.
*
* @type {Record<string,true|undefined>}
* @type {Record<string, true | undefined>}
*/
export const logged = Object.create( null );

Expand Down Expand Up @@ -78,3 +78,5 @@ export default function deprecated( feature, options = {} ) {

logged[ message ] = true;
}

/** @typedef {import('utility-types').NonUndefined<Parameters<typeof deprecated>[1]>} DeprecatedOptions */

0 comments on commit 719d575

Please sign in to comment.