Question: In JSX/TSX syntax from react, all inputs seems to be define with the same props declaration which is `InputHTMLAttributes`:

```js
    interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
        accept?: string;
        alt?: string;
        autoComplete?: string;
        autoFocus?: boolean;
        capture?: boolean | string; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
        checked?: boolean;
        crossOrigin?: string;
        disabled?: boolean;
        form?: string;
        formAction?: string;
        formEncType?: string;
        formMethod?: string;
        formNoValidate?: boolean;
        formTarget?: string;
        height?: number | string;
        list?: string;
        max?: number | string;
        maxLength?: number;
        min?: number | string;
        minLength?: number;
        multiple?: boolean;
        name?: string;
        pattern?: string;
        placeholder?: string;
        readOnly?: boolean;
        required?: boolean;
        size?: number;
        src?: string;
        step?: number | string;
        type?: string;
        value?: string | ReadonlyArray<string> | number;
        width?: number | string;

        onChange?: ChangeEventHandler<T>;
    }

```

I want to define a specific type for only an input of type `number` so that TypeScript complains if I use a `checked` or `disabled` prop on it:

```html
<!-- invalid `checked` prop -->
<input type="number" step="any" min="0" max="100" value="22.33" checked={true} />

```

So is there already a type definition for that coming from React?

I know that I can just define it like the following but I would prefer to use an official source:

```js
interface InputNumberProps {
  type: 'number';
  max?: number | string;
  min?: number | string;
  ...
}

```

Answer: 
```
to_upd <- which(m>0)
m[to_upd] <- (m * v[col(m)])[to_upd]
m
#       a  b  c
# [1,] -1 -1 -1
# [2,]  4  6 -9
# [3,]  6  6 -3
# [4,]  8 -4 -2

```

Data

```
v <- c(2,3,-3)
m <- cbind(
  a = c(-1,2,3,4),
  b = c(-1,2,2,-4),
  c = c(-1,3,1,-2)
)

```
Here is another base R option using `msk` as the mask

```
> m*t((msk <- t(m)>0)*v + !msk)
      a  b  c
[1,] -1 -1 -1
[2,]  4  6 -9
[3,]  6  6 -3
[4,]  8 -4 -2

```