mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: It's a skeleton for preparing schema json from native modules. Right not it does nothing, but it should considered as a kind of workplace for further work Reviewed By: TheSavior, cpojer, RSNara Differential Revision: D16107216 fbshipit-source-id: 12717d015e7409d980ef16cccd81330fa978b0b1
34 lines
710 B
JavaScript
34 lines
710 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {MethodTypeShape} from '../../CodegenSchema.js';
|
|
|
|
function buildMethodSchema(property) {
|
|
return undefined;
|
|
}
|
|
|
|
// $FlowFixMe there's no flowtype for ASTs
|
|
type PropAST = Object;
|
|
|
|
function getMethods(
|
|
typeDefinition: $ReadOnlyArray<PropAST>,
|
|
): $ReadOnlyArray<MethodTypeShape> {
|
|
return typeDefinition
|
|
.filter(property => property.type === 'ObjectTypeProperty')
|
|
.map(buildMethodSchema)
|
|
.filter(Boolean);
|
|
}
|
|
|
|
module.exports = {
|
|
getMethods,
|
|
};
|