Skip to content

Commit 8e1e679

Browse files
authored
Merge pull request #131 from DDtMM/18.x
18.x
2 parents 59615b6 + eb2c0a7 commit 8e1e679

File tree

88 files changed

+480
-448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+480
-448
lines changed

.eslintrc.json

-38
This file was deleted.

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# <img src="https://raw.githubusercontent.com/DDtMM/angular-signal-generators/main/projects/demo/src/assets/angular-signal-generators-logo.png" alt="Angular Signal Generators Logo" width="32" height="32" style="width: 32px; height: 32px" /> Angular Signal Generators
1+
# Angular Signal Generators
22

3-
Streamline your Angular development with Angular Signal Generators,
3+
Streamline your Angular development with Angular Signal Generators,
44
a library of signals and utilities designed to replace common patterns for faster, cleaner code.
55

66
Check out the **[demos](https://ddtmm.github.io/angular-signal-generators/)** to learn more.
@@ -16,7 +16,7 @@ npm install @ddtmm/angular-signal-generators
1616
```
1717

1818
## Usage
19-
You can import the signals and utilities from `'@ddtmm/angular-signal-generators`. Like regular signals, the library's signals are used just like ordinary functions.
19+
You can import the signals and utilities from `@ddtmm/angular-signal-generators`. Like regular signals, the library's signals are used just like ordinary functions.
2020

2121
```ts
2222
import { debounceSignal, liftSignal, timerSignal } from '@ddtmm/angular-signal-generators';
@@ -123,14 +123,14 @@ Converts a signal to an AsyncIterator. Once created, changes are retained until
123123

124124
## Conventions
125125

126-
### SignalInput and ValueSource
126+
### ReactiveSource and ValueSource
127127
As much as possible signals the functions provided try to create signals from either values or other signals.
128-
To accommodate this, many arguments are of type **SignalInput&lt;T&gt;** or **ValueSource&lt;T&gt;**.
128+
To accommodate this, many arguments are of type **ReactiveSource&lt;T&gt;** or **ValueSource&lt;T&gt;**.
129129

130-
*SignalInput* can be either something that can be either converted to a signal with *toSignal*, a function that can be passed to *computed* or a regular old *signal*. The purpose of this is to make things just a bit more convenient.
130+
*ReactiveSource* can be either something that can be either converted to a signal with *toSignal*, a function that can be passed to *computed* or a regular old *signal*. The purpose of this is to make things just a bit more convenient.
131131

132132
### ValueSource
133-
A *ValueSource* is a *SignalSource* ***or a value***. The limiting factor here is that if you wanted to use a *SignalSource* as a value, then you'd have to wrap that in a *signal*.
133+
A *ValueSource* is a *ReactiveSource* ***or a value***. The limiting factor here is that if you wanted to use a *SignalSource* as a value, then you'd have to wrap that in a *signal*.
134134

135135
```ts
136136
const timerFromValue = timerSignal(1000);
@@ -144,10 +144,11 @@ const timerSource$ = new BehaviorSubject(1000);
144144
const timerFromObservable = timer(timerSource$);
145145
```
146146
### Overloads
147-
Several generators that accept a traditional value and a *SignalInput* will have different return types. Those that accept a *SignalInput* will return a read only signal, whereas those with a traditional value will have methods to update the signal, though not necessarily the same as a *WritableSignal*.
147+
Several generators that accept a traditional value and a *ReactiveSource* will have different return types. Those that accept a *ReactiveSource* will return a read only signal, whereas those with a traditional value will have methods to update the signal, though not necessarily the same as a *WritableSignal*.
148148

149149
### Injector
150-
All signal generators have an options parameter that accept injector. This is either because *effect* is needed sometimes or if you *toSignal* is used.
150+
All signal generators have an options parameter that accept injector. This is either because *effect* is needed sometimes or it passed
151+
along if an observable is converted to an signal.
151152

152153

153154
## Issues or Ideas?

eslint.config.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = tsEslint.config(
1313
{
1414
// Everything in this config object targets our TypeScript files (Components, Directives, Pipes etc)
1515
files: ['**/*.ts'],
16-
ignores: ['**/*.spec.ts'],
16+
ignores: ['**/*.spec.ts', '**/testing/**/*.ts'],
1717
extends: [
1818
eslint.configs.recommended,
1919
...tsEslint.configs.strict,
@@ -45,7 +45,7 @@ module.exports = tsEslint.config(
4545
}
4646
},
4747
{
48-
files: ['**/*.spec.ts'],
48+
files: ['**/*.spec.ts, **/testing/**/*.ts'],
4949
extends: [
5050
eslint.configs.recommended,
5151
...tsEslint.configs.recommended,
@@ -57,10 +57,13 @@ module.exports = tsEslint.config(
5757
// Everything in this config object targets our HTML files (external templates,
5858
// and inline templates as long as we have the `processor` set on our TypeScript config above)
5959
files: ['**/*.html'],
60+
ignores: ['**/api**/*.html'],
6061
extends: [
6162
...angular.configs.templateRecommended,
6263
...angular.configs.templateAccessibility
6364
],
64-
rules: {}
65+
rules: {
66+
'@typescript-eslint/consistent-indexed-object-style': 'off'
67+
}
6568
},
6669
);

package-lock.json

+63-63
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)