Files
yoga/javascript/src/entrypoint/wasm-async-web.ts
Nick Gerleman 6628873c2a Separate Node and Web Binaries (#1325)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1325

Fixes https://github.com/facebook/yoga/issues/1321

Reviewed By: cortinico

Differential Revision: D47368830

fbshipit-source-id: 570a45ad7fd182ef82e6edda4037ae2f6faa0c75
2023-07-12 18:04:17 -07:00

27 lines
598 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.
*
* @format
*/
import wrapAssembly from '../wrapAssembly';
import type {Yoga} from '../wrapAssembly';
export * from '../generated/YGEnums';
export type {
Config,
DirtiedFunction,
MeasureFunction,
Node,
Yoga,
} from '../wrapAssembly';
const loadAssembly = require('../../binaries/wasm-async-web');
export async function loadYoga(): Promise<Yoga> {
return wrapAssembly(await loadAssembly());
}