Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deprecate exported legacy factories of providers #121

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libs/midi/src/utils/input-by-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import {MIDI_ACCESS} from '../tokens/midi-access';
import {MIDI_INPUT} from '../tokens/midi-input';
import {MIDI_INPUT_QUERY} from '../tokens/midi-input-query';

import MIDIInput = WebMidi.MIDIInput;
import MIDIAccess = WebMidi.MIDIAccess;

import MIDIInput = WebMidi.MIDIInput;

/**
* Provide MIDIInput by id
*
Expand All @@ -25,6 +26,10 @@ export function inputById(id: string): Provider[] {
];
}

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function inputByIdFactory(
midiAccess: Promise<MIDIAccess>,
id: string,
Expand Down
7 changes: 6 additions & 1 deletion libs/midi/src/utils/input-by-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import {MIDI_ACCESS} from '../tokens/midi-access';
import {MIDI_INPUT} from '../tokens/midi-input';
import {MIDI_INPUT_QUERY} from '../tokens/midi-input-query';

import MIDIInput = WebMidi.MIDIInput;
import MIDIAccess = WebMidi.MIDIAccess;

import MIDIInput = WebMidi.MIDIInput;

/**
* Provide MIDIInput by name
*
Expand All @@ -25,6 +26,10 @@ export function inputByName(name: string): Provider[] {
];
}

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function inputByNameFactory(
midiAccess: Promise<MIDIAccess>,
name: string,
Expand Down
7 changes: 6 additions & 1 deletion libs/midi/src/utils/output-by-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import {MIDI_ACCESS} from '../tokens/midi-access';
import {MIDI_OUTPUT} from '../tokens/midi-output';
import {MIDI_OUTPUT_QUERY} from '../tokens/midi-output-query';

import MIDIOutput = WebMidi.MIDIOutput;
import MIDIAccess = WebMidi.MIDIAccess;

import MIDIOutput = WebMidi.MIDIOutput;

/**
* Provide MIDIOutput by id
*
Expand All @@ -25,6 +26,10 @@ export function outputById(id: string): Provider[] {
];
}

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function outputByIdFactory(
midiAccess: Promise<MIDIAccess>,
id: string,
Expand Down
7 changes: 6 additions & 1 deletion libs/midi/src/utils/output-by-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import {MIDI_ACCESS} from '../tokens/midi-access';
import {MIDI_OUTPUT} from '../tokens/midi-output';
import {MIDI_OUTPUT_QUERY} from '../tokens/midi-output-query';

import MIDIOutput = WebMidi.MIDIOutput;
import MIDIAccess = WebMidi.MIDIAccess;

import MIDIOutput = WebMidi.MIDIOutput;

/**
* Provide MIDIOutput by name
*
Expand All @@ -25,6 +26,10 @@ export function outputByName(name: string): Provider[] {
];
}

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function outputByNameFactory(
midiAccess: Promise<MIDIAccess>,
name: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import {Observable} from 'rxjs';
import {ResizeObserverService} from '../services/resize-observer.service';
import {RESIZE_OPTION_BOX, RESIZE_OPTION_BOX_DEFAULT} from '../tokens/resize-option-box';

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
// TODO switch to Attribute once https://github.com/angular/angular/issues/36479 is fixed
export function boxExtractor({
nativeElement,
Expand All @@ -15,6 +19,10 @@ export function boxExtractor({
return boxFactory(attribute);
}

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function boxFactory(
box: ResizeObserverBoxOptions | null,
): ResizeObserverBoxOptions {
Expand Down
4 changes: 4 additions & 0 deletions libs/universal/src/constants/universal-navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export const NAVIGATOR_MOCK = {
vibrate: alwaysFalse,
} as unknown as Navigator;

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function navigatorFactory(userAgent: string | null): Navigator {
return {
...NAVIGATOR_MOCK,
Expand Down
4 changes: 4 additions & 0 deletions libs/universal/src/constants/universal-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const WINDOW_HANDLER: ProxyHandler<Window> = {
},
};

/**
* @deprecated View Engine legacy
* TODO: use arrow function for `useFactory` and delete this exported function in future major release
*/
export function windowFactory(
document: Document,
location: Location | null,
Expand Down