"Fossies" - the Fresh Open Source Software Archive

Member "cli-1.1280.1/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/update-dependencies/is-defined.ts" (20 Feb 2024, 233 Bytes) of package /linux/misc/snyk-cli-1.1280.1.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // TS is not capable of determining when Array.filter has removed undefined
    2 // values without a manual Type Guard, so thats what this does
    3 export function isDefined<T>(t: T | undefined): t is T {
    4   return typeof t !== 'undefined';
    5 }