Skip to content

Commit 3fcde34

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Relocate __typetests__ directory, format (#57367)
Summary: Pull Request resolved: #57367 Places this one folder up, in a location that will be preserved when we later delete the manual `types/` dir. These tests already apply to both the `types/Libraries` dirs and the generated `types_generated/`. Changelog: [Internal] ___ Differential Revision: D110055787 fbshipit-source-id: 5ff190d301628877c9bda57c92b1af1a2917f1ca
1 parent 5574d94 commit 3fcde34

10 files changed

Lines changed: 11 additions & 9 deletions

File tree

File renamed without changes.

packages/react-native/types/__typetests__/fabric-component-sample.ts renamed to packages/react-native/__typetests__/fabric-component-sample.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/react-native/types/__typetests__/legacy-properties.tsx renamed to packages/react-native/__typetests__/legacy-properties.tsx

File renamed without changes.

packages/react-native/types/__typetests__/stylesheet-create.tsx renamed to packages/react-native/__typetests__/stylesheet-create.tsx

File renamed without changes.

packages/react-native/types/__typetests__/stylesheet-flatten.tsx renamed to packages/react-native/__typetests__/stylesheet-flatten.tsx

File renamed without changes.

packages/react-native/types/__typetests__/turbo-module-sample.ts renamed to packages/react-native/__typetests__/turbo-module-sample.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
68
*/
79

8-
import { TurboModule, TurboModuleRegistry } from 'react-native';
9-
'use strict';
10+
import {TurboModule, TurboModuleRegistry} from 'react-native';
1011

1112
export interface SomeConstants {
12-
x: string;
13-
y: number;
14-
z: boolean;
13+
x: string;
14+
y: number;
15+
z: boolean;
1516
}
1617

1718
export interface SampleSpec extends TurboModule {
18-
getConstants(): SomeConstants
19-
doSomething(): void;
19+
getConstants(): SomeConstants;
20+
doSomething(): void;
2021
}
2122

2223
export default TurboModuleRegistry.getEnforcing<SampleSpec>('Sample');

packages/react-native/types/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"noEmit": true,
1313
"forceConsistentCasingInFileNames": true,
1414
"paths": {"react-native": ["."]}
15-
}
15+
},
16+
"include": ["**/*.d.ts", "../__typetests__/**/*"]
1617
}

scripts/js-api/build-types/templates/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"moduleResolution": "bundler",
1414
"customConditions": ["react-native-strict-api"]
1515
},
16-
"include": ["**/*.d.ts", "../types/__typetests__/**/*"]
16+
"include": ["**/*.d.ts", "../__typetests__/**/*"]
1717
}

0 commit comments

Comments
 (0)