question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

p({ type: Number }) doesn't work.

See original GitHub issue

TS v2.1.1, av-ts v0.5.4

num: number = p({
  type: Number
})

cause

Error:(15, 3) TS2322:Type 'Number' is not assignable to type 'number'.
  'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.

Boolean is similar. But p(Number) works.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
whitetrefoilcommented, Nov 29, 2016

Just found that code like

  @Prop show    = <boolean> p({ type: Boolean, default: false })
  @Prop width   = <number> p({ type: Number, default: DEFAULT_WIDTH })

works…

0reactions
whitetrefoilcommented, Jul 5, 2017

Nice! Will try the new version tomorrow~

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input of type number not working as expected - Stack Overflow
I think, I have a solution for you. Your Input should be like <input matInput placeholder="days" type="number" [value]="element.day1?
Read more >
InputNumber with type ="number" doesn´t work
Hey guys, Anyone knows how can I use <p:inputNumber with type ="number" ? I need to use a web application on a tablet...
Read more >
<input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >
HTML5 Input type=number broken in Google Chrome #5422
NVDA 2015.3 does not work with HTML5 input type=number in Google Chrome 46. It does announce it as a spin box however. By...
Read more >
694391 - <input type="number"> doesn't allow non-Latin digits ...
This issue is about making non-latin digits work regardless of UI language. The original bug report did not mention the UI language at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found