| 5 | |
| 6 | @Injectable({ providedIn: 'root' }) |
| 7 | export class IsrService implements IsrServiceInterface { |
| 8 | private platformId = inject(PLATFORM_ID); |
| 9 | |
| 10 | constructor() { |
| 11 | if (isPlatformServer(this.platformId)) { |
| 12 | throw new Error( |
| 13 | `IsrService should not be instantiated on the server. |
| 14 | It is only used on the client as a injection token.`, |
| 15 | ); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | getState(): IsrState { |
| 20 | return { revalidate: null, errors: [], extra: {} }; |
| 21 | } |
| 22 | |
| 23 | patchState(partialState: Partial<IsrState>): void { |
| 24 | return; |
| 25 | } |
| 26 | |
| 27 | getExtra(): Record<string, unknown> { |
| 28 | return {}; |
| 29 | } |
| 30 | |
| 31 | activate(): void { |
| 32 | return; |
| 33 | } |
| 34 | |
| 35 | addError(error: Error): void { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | addExtra(extra?: Record<string, unknown> | undefined): void { |
| 40 | return; |
| 41 | } |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected