-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make optional fields optional in
MappingGenericProperty
(#703)
Signed-off-by: alex-at-cascade <[email protected]>
- Loading branch information
1 parent
835ad4e
commit 6073960
Showing
3 changed files
with
32 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
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,20 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
*/ | ||
|
||
import { expectAssignable } from 'tsd'; | ||
import { MappingProperty } from '../../api/types'; | ||
|
||
// https://github.com/opensearch-project/opensearch-js/issues/703 | ||
// only manifested when value is in a variable, so the following would *not* catch it: | ||
// | ||
// expectAssignable<MappingProperty>({ type: 'date' }); | ||
|
||
const x = { type: 'date' }; | ||
expectAssignable<MappingProperty>(x); |