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

Object circular assignment never error #58925

Closed
1 task done
Jevin0 opened this issue Jun 19, 2024 · 2 comments
Closed
1 task done

Object circular assignment never error #58925

Jevin0 opened this issue Jun 19, 2024 · 2 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@Jevin0
Copy link

Jevin0 commented Jun 19, 2024

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

https://www.typescriptlang.org/play/?ts=5.0.4#code/JYOwLgpgTgZghgYwgAgMoBtgBNoBUD2+6YwADgApT6kDOyA3gLABQyyWwNcARuhFgH4AXMm6E+cEAG4WbUukQQAthHDDkNMFFABzGa2ScAInCgBrdWKIRJ+gL4sWCfCE3Iw4khSq0RGbHieZJTUdAC8DLLsnDx8WCLw6DQQLA7MTi5uWHBgcEIAShAAjgCuwFD8ADz+OFAERF4htAB8yBFMBhxcvPwJcEkQADRR8ooq4CIARB6kk8MGxqZmfQPzaSww+FDIABTOrmDIZhAAnoYg7kHeoQCUkQb7bgD6x2cRr8hwdK-4MGiYtXqxGCPho+ii2VyAG0XqcALptS4NEGhGGvOFRR7WAB06HwOh2sJON1SjmYQA

@snarbies
Copy link

You are trying to copy, key-by-key, from this type:

{
  disabled?: boolean;
  placement?: string;
  isDark?: boolean;
}

...to this type...

{
  disabled: boolean;
  placement: string;
  isDark: boolean;
}

That would mean copying values that might be undefined to properties that don't accept undefined.

This is simply a case of typescript doing its job and telling you you've made a mistake.

@Jevin0 Jevin0 closed this as completed Jun 20, 2024
@Jevin0
Copy link
Author

Jevin0 commented Jun 20, 2024

You are trying to copy, key-by-key, from this type:

{
  disabled?: boolean;
  placement?: string;
  isDark?: boolean;
}

...to this type...

{
  disabled: boolean;
  placement: string;
  isDark: boolean;
}

That would mean copying values that might be undefined to properties that don't accept undefined.

This is simply a case of typescript doing its job and telling you you've made a mistake.

You are trying to copy, key-by-key, from this type:

{
  disabled?: boolean;
  placement?: string;
  isDark?: boolean;
}

...to this type...

{
  disabled: boolean;
  placement: string;
  isDark: boolean;
}

That would mean copying values that might be undefined to properties that don't accept undefined.

This is simply a case of typescript doing its job and telling you you've made a mistake.

ok, I know, thank you

@RyanCavanaugh RyanCavanaugh added the Question An issue which isn't directly actionable in code label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

3 participants