Skip to content
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

Bug on TypeGuardError.path when dynamic propertied array comes #234

Closed
samchon opened this issue Oct 10, 2022 · 0 comments
Closed

Bug on TypeGuardError.path when dynamic propertied array comes #234

samchon opened this issue Oct 10, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@samchon
Copy link
Owner

samchon commented Oct 10, 2022

Bug Report

Note that, the bug you're reporting may have registered in the issues by another user. Even the bug you're reporting may have been fixed in the @next version. In such reasons, I recommend you to check the old issues and reproduct your code with the @next version before publishing the bug reporting issue.

`npm install --save-dev typescript-json@next`

When the same error occurs even in the @next version, then please fill the below template:

Summary

Invalid programming like below when dynamic propertied array comes

image

  • SDK Version: 3.3.8
  • Expected behavior: Exact programming
  • Actual behavior: Wrong programming

The TypeGuardError.path value must be combined like below:

path + $join(key) + "[" + index9 + "]

Code occuring the bug

import TSON from "typescript-json";

interface DynamicArray {
    [key: string]: string[];
}

TSON.assertType<DynamicArray>({});
@samchon samchon added the bug Something isn't working label Oct 10, 2022
@samchon samchon self-assigned this Oct 10, 2022
@samchon samchon added this to To do in v3.3 Update via automation Oct 10, 2022
samchon added a commit that referenced this issue Oct 10, 2022
Fix #234 - invalid `TypeGuardError.path` bug
v3.3 Update automation moved this from To do to Done Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

1 participant