rxjs-tslint-rules icon indicating copy to clipboard operation
rxjs-tslint-rules copied to clipboard

shareReplay is forbidden unless a config argument is passed

Open sonikasharma1403 opened this issue 2 years ago • 0 comments

const SHARE_REPLAY_CONFIG = { bufferSize: 1, refCount: true }; observable.pipe(shareReplay(SHARE_REPLAY_CONFIG))

I am using a constant variable and then passing it to the shareReplay operator. If we do this, lint throws shareReplay is forbidden unless a config argument is passed. Replacing the variable with the object fixes the issues. shouldn't the type be infered?

sonikasharma1403 avatar Jun 09 '22 12:06 sonikasharma1403