-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup TypeScript with export maps (#1284)
Summary: Pull Request resolved: #1284 This makes TypeScript resolution play nicely with export maps, and converts the entrypoints to TypeScript. We remove the non-export-map fallbacks as well, so the export maps are always followed. Tests are moved to load yoga from its external export, testing the entrypoints. This moves the only untyped bit to the binary wrapper, which another diff will move. Reviewed By: yungsters Differential Revision: D45713689 fbshipit-source-id: 228e6f2c9d53520230707a81e76c3c35fcd46de5
- Loading branch information
1 parent
104646d
commit af89315
Showing
25 changed files
with
183 additions
and
176 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/binaries | ||
/build | ||
/dist | ||
/node_modules |
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
/** | ||
* 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/asmjs-async'); | ||
|
||
export async function loadYoga(): Promise<Yoga> { | ||
return wrapAssembly(await loadAssembly()); | ||
} |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
/** | ||
* 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'; | ||
|
||
export * from '../generated/YGEnums'; | ||
export type { | ||
Config, | ||
DirtiedFunction, | ||
MeasureFunction, | ||
Node, | ||
Yoga, | ||
} from '../wrapAssembly'; | ||
|
||
const loadAssembly = require('../../binaries/asmjs-sync'); | ||
const Yoga = wrapAssembly(loadAssembly()); | ||
export default Yoga; |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
/** | ||
* 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'); | ||
|
||
export async function loadYoga(): Promise<Yoga> { | ||
return wrapAssembly(await loadAssembly()); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.