Skip to content

refactor: Add ability to watch typescript definition changes #2489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
},
"scripts": {
"build": "node build_releases.js",
"build:types": "tsc && prettier --write 'types/{**/*,*}.ts'",
"build:types": "tsc",
"ci:typecheck": "node ./ci/typecheck.js",
"release": "node build_releases.js && npm publish",
"test": "cross-env PARSE_BUILD=node jest",
Expand All @@ -111,6 +111,7 @@
"watch:browser": "cross-env PARSE_BUILD=browser npm run watch",
"watch:node": "cross-env PARSE_BUILD=node npm run watch",
"watch:react-native": "cross-env PARSE_BUILD=react-native npm run watch",
"watch:ts": "tsc --watch",
"integration": "cross-env TESTING=1 jasmine --config=jasmine.json",
"docs": "jsdoc -c ./jsdoc-conf.json ./src",
"madge:circular": "madge ./src --extensions js,ts --circular",
Expand Down
7 changes: 2 additions & 5 deletions types/Analytics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
* @returns {Promise} A promise that is resolved when the round-trip
* to the server completes.
*/
export declare function track(
name: string,
dimensions: {
export declare function track(name: string, dimensions: {
[key: string]: string;
}
): Promise<void>;
}): Promise<void>;
100 changes: 50 additions & 50 deletions types/AnonymousUtils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,56 +29,56 @@ import type { RequestOptions } from './RESTController';
* @static
*/
declare const AnonymousUtils: {
/**
* Gets whether the user has their account linked to anonymous user.
*
* @function isLinked
* @name Parse.AnonymousUtils.isLinked
* @param {Parse.User} user User to check for.
* The user must be logged in on this device.
* @returns {boolean} <code>true</code> if the user has their account
* linked to an anonymous user.
* @static
*/
isLinked(user: ParseUser): boolean;
/**
* Logs in a user Anonymously.
*
* @function logIn
* @name Parse.AnonymousUtils.logIn
* @param {object} options MasterKey / SessionToken.
* @returns {Promise} Logged in user
* @static
*/
logIn(options?: RequestOptions): Promise<ParseUser>;
/**
* Links Anonymous User to an existing PFUser.
*
* @function link
* @name Parse.AnonymousUtils.link
* @param {Parse.User} user User to link. This must be the current user.
* @param {object} options MasterKey / SessionToken.
* @returns {Promise} Linked with User
* @static
*/
link(user: ParseUser, options?: RequestOptions): Promise<ParseUser>;
/**
* Returns true if Authentication Provider has been registered for use.
*
* @function isRegistered
* @name Parse.AnonymousUtils.isRegistered
* @returns {boolean}
* @static
*/
isRegistered(): boolean;
_getAuthProvider(): {
restoreAuthentication(): boolean;
getAuthType(): string;
getAuthData(): {
authData: {
id: string;
};
/**
* Gets whether the user has their account linked to anonymous user.
*
* @function isLinked
* @name Parse.AnonymousUtils.isLinked
* @param {Parse.User} user User to check for.
* The user must be logged in on this device.
* @returns {boolean} <code>true</code> if the user has their account
* linked to an anonymous user.
* @static
*/
isLinked(user: ParseUser): boolean;
/**
* Logs in a user Anonymously.
*
* @function logIn
* @name Parse.AnonymousUtils.logIn
* @param {object} options MasterKey / SessionToken.
* @returns {Promise} Logged in user
* @static
*/
logIn(options?: RequestOptions): Promise<ParseUser>;
/**
* Links Anonymous User to an existing PFUser.
*
* @function link
* @name Parse.AnonymousUtils.link
* @param {Parse.User} user User to link. This must be the current user.
* @param {object} options MasterKey / SessionToken.
* @returns {Promise} Linked with User
* @static
*/
link(user: ParseUser, options?: RequestOptions): Promise<ParseUser>;
/**
* Returns true if Authentication Provider has been registered for use.
*
* @function isRegistered
* @name Parse.AnonymousUtils.isRegistered
* @returns {boolean}
* @static
*/
isRegistered(): boolean;
_getAuthProvider(): {
restoreAuthentication(): boolean;
getAuthType(): string;
getAuthData(): {
authData: {
id: string;
};
};
};
};
};
export default AnonymousUtils;
12 changes: 3 additions & 9 deletions types/Cloud.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ import type { RequestOptions } from './RESTController';
* @returns {Promise} A promise that will be resolved with the result
* of the function.
*/
export declare function run<T extends () => any>(
name: string,
data?: null,
options?: RequestOptions
): Promise<ReturnType<T>>;
export declare function run<
T extends (param: {
export declare function run<T extends () => any>(name: string, data?: null, options?: RequestOptions): Promise<ReturnType<T>>;
export declare function run<T extends (param: {
[P in keyof Parameters<T>[0]]: Parameters<T>[0][P];
}) => any,
>(name: string, data: Parameters<T>[0], options?: RequestOptions): Promise<ReturnType<T>>;
}) => any>(name: string, data: Parameters<T>[0], options?: RequestOptions): Promise<ReturnType<T>>;
/**
* Gets data for the current set of cloud jobs.
*
Expand Down
Loading