Skip to content

Conversation

@abotteram
Copy link
Contributor

@abotteram abotteram commented Feb 28, 2018

Description

Adds documentation to coding-guideline.md, regarding experimental exposed APIs.

Experimental APIs

Exposed APIs that are still being tested, discussed and are subject to change should be prefixed with __experimental, until they are finalized. This is meant to discourage developers from relying on the API, because it might be removed or changed in the (near) future.

Example:

export {
	internalApi as __experimentalExposedApi
} from './internalApi.js';

How Has This Been Tested?

Screenshots (jpeg or gifs if applicable):

Types of changes

Documentation

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@atimmer
Copy link
Member

atimmer commented Feb 28, 2018

For clarification, I would change the imported API to internalApi. So the code example becomes:

export {
	internalApi as experimental__exposedApi
} from './internalApi.js';

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending feedback from #4484 (comment) per how the demonstrated example is an ESLint error on camelcase

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@aduth aduth added the [Type] Developer Documentation Documentation for developers label Mar 1, 2018
@atimmer atimmer merged commit f1d96b3 into WordPress:master Mar 2, 2018
@atimmer atimmer deleted the add/code-style-experimental-documentation branch March 2, 2018 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants