-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ckeditor/ck/24
Feature: CKEditorCloudResult now returns more narrowly typed attributes for CKBox and CKEditorPremiumFeatures, taking into account CKEditorCloudConfig. Closes #24
- Loading branch information
Showing
3 changed files
with
79 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/** | ||
* A type that allows to set a value or leave it blank conditionally. | ||
* It's useful when we provide config, and depending on the config, we want to set a value or leave it blank. | ||
*/ | ||
export type ConditionalBlank<Condition, Value> = | ||
Condition extends true | object ? NonNullable<Value> : | ||
Condition extends boolean ? NonNullable<Value> | undefined : | ||
undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters