Summary: UINode has never been a good name, we have 3 versions of a node. ClientNode Previously UINode (the raw data from the client) NestedNode (for the visualiser) TreeNode (extends ClientNode and adds stuff specific to the tree like indentation and expanded states) Arguablely we dont need nested node but that is another story Reviewed By: elboman Differential Revision: D47547529 fbshipit-source-id: 9a3b119d1230ea7b6734e7a3270c28287b04faf1
33 lines
789 B
TypeScript
33 lines
789 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import {DeviceOS} from 'flipper-plugin';
|
|
import {Id, Metadata, ClientNode} from '../ClientTypes';
|
|
import {StreamInterceptor} from '../DesktopTypes';
|
|
|
|
export function getStreamInterceptor(_: DeviceOS): StreamInterceptor {
|
|
return new NoOpStreamInterceptor();
|
|
}
|
|
|
|
class NoOpStreamInterceptor implements StreamInterceptor {
|
|
init() {
|
|
return null;
|
|
}
|
|
|
|
async transformNodes(
|
|
nodes: Map<Id, ClientNode>,
|
|
): Promise<[Map<Id, ClientNode>, Metadata[]]> {
|
|
return [nodes, []];
|
|
}
|
|
|
|
async transformMetadata(metadata: Metadata): Promise<Metadata> {
|
|
return metadata;
|
|
}
|
|
}
|