Skip to content

feat: add math/base/special/modff #7101

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 8 commits into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: use tuple for return type
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
  • Loading branch information
anandkaranubc committed Jun 14, 2025
commit 2c660a2da697f04aa33b82b533a9a121d9c3cc92
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface Modff {
* var parts = modff( 3.14 );
* // returns [ 3.0, 0.1400001049041748 ]
*/
( x: number ): Array<number>;
( x: number ): [ number, number ];

/**
* Decomposes a single-precision floating-point number into integral and fractional parts, each having the same type and sign as the input value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import modff = require( './index' );

// The function returns a numeric array...
{
modff( 1.0 ); // $ExpectType number[]
modff( 1.0 ); // $ExpectType [number, number]
}

// The compiler throws an error if the function is provided an argument other than a number...
Expand Down