-
-
Notifications
You must be signed in to change notification settings - Fork 600
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
TypeScript cannot resolve types when importing from parse/node (the recommended entry point for Node.js/server environments), even though types/node.d.ts exists in the package.
The package.json only declares the main types entry point ("types": "types/index.d.ts") but lacks typesVersions or exports mappings to make subpath imports (parse/node, parse/react-native) discoverable by TypeScript.
Steps to reproduce
- Create a TypeScript project with
"strict": true - Install
parsepackage - Import using the Node.js entry point:
import Parse from 'parse/node';
- Observe TypeScript error
Actual Outcome
Could not find a declaration file for module 'parse/node'.
Expected Outcome
TypeScript should resolve types from types/node.d.ts when importing from parse/node.
Environment
Client
- Parse JS SDK version: 8.0.0
Additional Context
The type definition files exist:
- types/node.d.ts - exists and re-exports from types/index.d.ts
- types/react-native.d.ts - exists and re-exports from types/index.d.ts
The types/tsconfig.json even has path mappings for internal testing, confirming this was the intended behavior:
"paths": {
"parse": ["."],
"parse/node": ["./node.d.ts"],
"parse/react-native": ["./react-native.d.ts"]
}Suggested fix: Add typesVersions and exports fields to package.json to expose these type mappings to package consumers.