Repository: angular
Issue: Expose `createInputSignal`, or ease restrictions on static analysis for Signal functions to reduce boilerplate
Labels: area: compiler,cross-cutting: signals

### Which @angular/* package(s) are relevant/related to the feature request?

core

### Description

The Angular CDK provides `coercion` functions to make it easy to transform `input` values. For example:

```ts
import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';

public readonly canEdit = input<boolean, BooleanInput>(false, { transform: coerceBooleanProperty });
public readonly canDelete = input<boolean, BooleanInput>(false, { transform: coerceBooleanProperty });
```

This makes it easy to use the component like below, where simply the presence of an empty `canEdit` or `canDelete` attribute will set the `input` Signal's value to `true`:

```html
<my-component canEdit canDelete />
```

When using something like Prettier with an 80-char line length, each input defined like this becomes three lines long:

```ts
    public readonly canEdit = input(false, {
        transform: coerceBooleanProperty,
    });
    public readonly canDelete = input(true, {
        transform: coerceBooleanProperty,
    });
```

This is a lot of boilerplate. Ideally, I'd be able to do create a utility function like the following:

```ts
export function booleanInput(defaultValue: boolean): InputSignalWithTransform<boolean, BooleanInput> {
    return input(defaultValue, { transform: coerceBooleanProperty });
}
```

```ts
public readonly canEdit = booleanInput(false);
public readonly canDelete = booleanInput(false);
```

However the above code isn't valid, because:

`✘ [ERROR] TS-998110: Unsupported call to the input function. This function can only be called in the initializer of a class member. [plugin angular-compiler]`

That's fair, so next I figured I'd try and simplify things by doing:

```ts
const boolTransform: InputOptionsWithTransform<boolean, BooleanInput> = {
    transform: coerceBooleanProperty
};
```

```ts
public readonly canEdit = input(false, boolTransform);
public readonly canDelete = input(false, boolTransform);
```

However this **also** isn't valid, because:

`✘ [ERROR] TS-991010: Argument needs to be an object literal that is statically analyzable. [plugin angular-compiler]`

I understand why both of these restrictions exist, but it would be nice to be able to avoid needing to rewrite out the entire options object for every Signal when they are all exactly the same.

### Proposed solution

I'm unsure of any knock-on effects of exposing it, but `core/src/authoring/input` contains the below function:

```ts
export function createInputSignal<T, TransformT>(
  initialValue: T,
  options?: InputOptions<T, TransformT>,
): InputSignalWithTransform<T, TransformT>;
```

If this were exposed from `@angular/core`, it could be possible to write wrapper utilities for signals such as the `booleanInput()` example I described, or other shortcuts such as a number-based signal that has min/max values and normalizes values to be within range, etc.

### Alternatives considered

Alternatively, relaxing (or expanding) the static analysis of Options objects would mean that it would be easier to repeat the same transforms/options throughout the codebase even when using the base `input`/`model`/etc functions.