Summary: Match Prettier config to match other Meta OSS projects Didn't update the test generator to use this form yet. Reviewed By: yungsters Differential Revision: D45570415 fbshipit-source-id: d5fd791b047debf41c28aecac75fb8dde16da3e3
28 lines
741 B
TypeScript
28 lines
741 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import type {Yoga} from 'yoga-layout';
|
|
|
|
declare global {
|
|
// eslint-disable-next-line no-var
|
|
var Yoga: Yoga | undefined;
|
|
// eslint-disable-next-line no-var
|
|
var YGBENCHMARK: (title: string, fn: () => void) => void;
|
|
}
|
|
|
|
if (globalThis.Yoga === undefined) {
|
|
throw new Error('Expected "Yoga" global to be set');
|
|
}
|
|
if (globalThis.YGBENCHMARK === undefined) {
|
|
throw new Error('Expected "YGBENCHMARK" global to be set');
|
|
}
|
|
|
|
const yoga = globalThis.Yoga;
|
|
const benchmark = globalThis.YGBENCHMARK;
|
|
|
|
export {yoga as Yoga, benchmark as YGBENCHMARK};
|