Repository navigation
Open
Description
Before submitting a new issue
- I tested using the latest version of the library, as the bug might be already fixed.
- I tested using a supported version of react native.
- I checked for possible duplicate issues, with possible answers.
Bug summary
tsconfig.json sets noImplicitUseStrict and noStrictGenericChecks, which TypeScript 7 no longer has, and src/native/styles/variables.ts indexes variables by a string after if (name in variables), where TypeScript 7 reads its type as { [VAR_SYMBOL]: true }. tsc --noEmit -p tsconfig.json passes with the pinned 6.0.3 and reports four errors with 7.0.2, npm's latest for typescript.
#391, #501 and #503 rewrite that lookup, and their heads report only the two options under 7.0.2; #412's head reports TS7053 three times there.
Library version
main at df32ce3
Environment info
System:
OS: Windows 11 10.0.26300
CPU: "(32) x64 AMD Ryzen 9 9950X3D 16-Core Processor "
Memory: 160.57 GB / 255.67 GB
Binaries:
Node:
version: 26.12.1
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 4.9.2
path: C:\Users\<user>\AppData\Roaming\npm\yarn.CMD
npm:
version: 12.2.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
Versions:
- 10.0.19041.0
- 10.0.26100.0
IDEs:
Android Studio: AI-262.9437.185.2621.16467767
Visual Studio: Not Found
Languages:
Java:
version: 17.0.20.1
path: C:\Program Files\Microsoft\jdk-17.0.20.101-hotspot\bin\javac.EXE
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.86.3
wanted: 0.86.3
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not foundSteps to reproduce
- Clone the reproducer branch, which is
mainat df32ce3 with one file added,reproduce.sh, and install:git clone --branch repro/typescript-7-typecheck https://github.com/YevheniiKotyrlo/react-native-css cd react-native-css yarn install - Run
bash reproduce.sh, which runstsc --noEmit -p tsconfig.jsonwith the pinned TypeScript, then with TypeScript 7.0.2 throughnpx.
reproduce.sh:
#!/usr/bin/env bash
# The repository's own type check under its pinned TypeScript, then under TypeScript 7.0.2
set -u
echo "== $(yarn tsc --version)"
yarn tsc --noEmit -p tsconfig.json
echo "exit $?"
echo "== $(npx --yes -p typescript@7.0.2 tsc --version)"
npx --yes -p typescript@7.0.2 tsc --noEmit -p tsconfig.json
echo "exit $?"Expected: both type checks exit 0.
Actual: 6.0.3 exits 0; 7.0.2 reports four errors and exits 1.
The run's output on main at df32ce3, Windows 11, Node 26.12.1
== Version 6.0.3
exit 0
== Version 7.0.2
src/native/styles/variables.ts(81,38): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ [VAR_SYMBOL]: true; }'.
No index signature with a parameter of type 'string' was found on type '{ [VAR_SYMBOL]: true; }'.
src/native/styles/variables.ts(82,23): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ [VAR_SYMBOL]: true; }'.
No index signature with a parameter of type 'string' was found on type '{ [VAR_SYMBOL]: true; }'.
tsconfig.json(30,5): error TS5023: Unknown compiler option 'noImplicitUseStrict'.
tsconfig.json(31,5): error TS5023: Unknown compiler option 'noStrictGenericChecks'.
exit 1
Reproducible example repository
https://github.com/YevheniiKotyrlo/react-native-css/tree/repro/typescript-7-typecheck
Metadata
Metadata
Assignees
Labels
No labels
Activity