Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dollaransh17
Copy link
Contributor

@dollaransh17 dollaransh17 commented Oct 3, 2025

  • Add comprehensive JSDoc documentation for helper functions in application/helpers-common.ts
  • Improve error handling in Android native app initialization with try-catch block
  • Resolve TODO comment about custom application type handling
  • Enhance timeConverter function with input validation and better error messages
  • Improve cubic-bezier animation error message with detailed format expectations
  • Add proper return type annotations for background state functions
  • Better developer warnings when reflection fails during app initialization

These improvements enhance code maintainability, provide better developer experience, and make error messages more actionable for debugging.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

…cumentation

- Add comprehensive JSDoc documentation for helper functions in application/helpers-common.ts
- Improve error handling in Android native app initialization with try-catch block
- Resolve TODO comment about custom application type handling
- Enhance timeConverter function with input validation and better error messages
- Improve cubic-bezier animation error message with detailed format expectations
- Add proper return type annotations for background state functions
- Better developer warnings when reflection fails during app initialization

These improvements enhance code maintainability, provide better developer experience,
and make error messages more actionable for debugging.
export function timeConverter(value: string): number {
let result = parseFloat(value);
if (!value || typeof value !== 'string') {
throw new Error(`Invalid time value: '${value}'. Expected a string with time value.`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Error(`Invalid time value: '${value}'. Expected a string with time value.`);
console.warn(`Invalid time value: '${value}'. Expected a string with time value.`);

we avoid unnecessary throw in core.


const numericValue = parseFloat(value);
if (isNaN(numericValue)) {
throw new Error(`Invalid time value: '${value}'. Expected a numeric value with optional 's' or 'ms' unit.`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Error(`Invalid time value: '${value}'. Expected a numeric value with optional 's' or 'ms' unit.`);
console.warn(`Invalid time value: '${value}'. Expected a numeric value with optional 's' or 'ms' unit.`);
Suggested change
throw new Error(`Invalid time value: '${value}'. Expected a numeric value with optional 's' or 'ms' unit.`);
console.warn(`Invalid time value: '${value}'. Expected a string with time value.`);

we avoid unnecessary throw in core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants