Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 3x 3x 3x 6x 2x | /*!
* Copyright 2020 Cognite AS
*/
import { Versioned3DFile } from '@cognite/sdk';
export const supportedVersions = [8];
export function getNewestVersionedFile(files: Versioned3DFile[]): Versioned3DFile {
return files
.filter(file => supportedVersions.includes(file.version))
.reduce((newestFile, file) => (file.version > newestFile.version ? file : newestFile), {
fileId: -1,
version: -1
});
}
|