"Fossies" - the Fresh Open Source Software Archive

Member "angular-cli-15.2.4/tests/angular_devkit/architect/node/jobs/add.ts" (16 Mar 2023, 549 Bytes) of package /linux/www/angular-cli-15.2.4.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 /**
    2  * @license
    3  * Copyright Google LLC All Rights Reserved.
    4  *
    5  * Use of this source code is governed by an MIT-style license that can be
    6  * found in the LICENSE file at https://angular.io/license
    7  */
    8 
    9 import { jobs } from '@angular-devkit/architect';
   10 
   11 // Export the job using a createJob. We use our own spec file here to do the job.
   12 export default jobs.createJobHandler<number[], null, number>(
   13   (input) => {
   14     return input.reduce((a, c) => a + c, 0);
   15   },
   16   {
   17     input: { items: { type: 'number' } },
   18     output: { type: 'number' },
   19   },
   20 );