Skip to content

Commit

Permalink
remove unnecessary exports
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Sep 30, 2022
1 parent 5a2002c commit a5cfa75
Show file tree
Hide file tree
Showing 72 changed files with 115 additions and 115 deletions.
2 changes: 1 addition & 1 deletion frontend/api/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function overwrite<T extends TaggedResource>(tr: T,
};
}

export interface EditStepProps {
interface EditStepProps {
step: Readonly<SequenceBodyItem>;
sequence: Readonly<TaggedSequence>;
index: number;
Expand Down
2 changes: 1 addition & 1 deletion frontend/connectivity/maybe_negate_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function determineStrategy(x: StratHints): SyncStrat {
return SyncStrat.ONLINE;
}

export interface OverrideHints {
interface OverrideHints {
consistent: boolean;
syncStatus: SyncStatus | undefined;
fbosVersion: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion frontend/devices/connectivity/diagnosis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface DiagnosisSaucerProps extends ConnectionStatusFlags {
syncStatus?: SyncStatus;
}

export const diagnosisStatus = (flags: ConnectionStatusFlags): boolean =>
const diagnosisStatus = (flags: ConnectionStatusFlags): boolean =>
flags.userMQTT && flags.botAPI && flags.botMQTT && flags.botFirmware;

export const DiagnosisSaucer = (props: DiagnosisSaucerProps) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/devices/connectivity/fbos_metric_history_plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const PlotBackground = () =>
strokeWidth={0.25} stroke={"grey"} />
</g>;

export interface PlotLinesProps {
interface PlotLinesProps {
telemetry: TaggedTelemetry[];
hoveredMetric: keyof Telemetry | undefined;
onHover: OnMetricHover;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import moment from "moment";
import { Telemetry } from "farmbot/dist/resources/api_resources";
import { cloneDeep, sortBy } from "lodash";

export const METRIC_TITLES = (): Partial<Record<keyof Telemetry, string>> => ({
const METRIC_TITLES = (): Partial<Record<keyof Telemetry, string>> => ({
soc_temp: t("Temp"),
wifi_level_percent: t("WiFi"),
uptime: t("Uptime"),
Expand Down
2 changes: 1 addition & 1 deletion frontend/devices/jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ interface JobBytesProgressWithTitle extends BytesProgress {
title: string;
}

export type JobProgressWithTitle =
type JobProgressWithTitle =
JobPercentProgressWithTitle | JobBytesProgressWithTitle;
4 changes: 2 additions & 2 deletions frontend/draggable/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export interface DataXferBase {
}

/** Data transfer payload used when moving a *new* step into an existing step */
export interface StepSpliceDataXfer extends DataXferBase {
interface StepSpliceDataXfer extends DataXferBase {
intent: "step_splice";
}

/** Data transfer payload used when reordering an existing step. */
export interface StepMoveDataXfer extends DataXferBase {
interface StepMoveDataXfer extends DataXferBase {
intent: "step_move";
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/draggable/step_dragger.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";
import { stepPut } from "./actions";
import { SequenceBodyItem as Step } from "farmbot";
import { DataXferIntent, StepDraggerProps } from "./interfaces";
Expand All @@ -19,7 +19,7 @@ export const NULL_DRAGGER_ID = 0xCAFEF00D;
* Drag this!
* </button>
* */
export const stepDragEventHandler = (dispatch: Function,
const stepDragEventHandler = (dispatch: Function,
step: Step,
intent: DataXferIntent,
draggerId: number,
Expand Down
2 changes: 1 addition & 1 deletion frontend/farm_designer/location_info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ interface ItemData<T> {
items: T[];
}

export function groupItemsByLocation<T extends Item>(
function groupItemsByLocation<T extends Item>(
items: T[],
chosenXY: Record<"x" | "y", number> | undefined,
) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/farm_designer/map/easter_eggs/bugs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function resetBugs() {
setEggStatus(EggKeys.BUGS_ARE_STILL_ALIVE, "true");
}

export function getBugTime() {
function getBugTime() {
return getEggStatus(EggKeys.LAST_BUG_TIME);
}

Expand Down
8 changes: 4 additions & 4 deletions frontend/farm_designer/map/group_order_visual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const sortedPointCoordinates = (
return convertToXY(sortGroup(groupSortType, groupPoints));
};

export interface PointsPathLineProps {
interface PointsPathLineProps {
orderedPoints: { x: number, y: number }[];
mapTransformProps: MapTransformProps;
color?: Color;
Expand All @@ -48,7 +48,7 @@ export interface PointsPathLineProps {
zoomLvl: number;
}

export const PointsPathLine = (props: PointsPathLineProps) =>
const PointsPathLine = (props: PointsPathLineProps) =>
<g id="group-order-line"
stroke={props.color || Color.mediumGray}
strokeWidth={props.strokeWidth || zoomCompensation(props.zoomLvl, 3)}
Expand All @@ -63,13 +63,13 @@ export const PointsPathLine = (props: PointsPathLineProps) =>
})}
</g>;

export interface PointsPathLabelsProps {
interface PointsPathLabelsProps {
orderedPoints: { x: number, y: number }[];
mapTransformProps: MapTransformProps;
zoomLvl: number;
}

export const PointsPathLabels = (props: PointsPathLabelsProps) =>
const PointsPathLabels = (props: PointsPathLabelsProps) =>
<g id="group-order-labels">
{props.orderedPoints.map((p, i) => {
const position = transformXY(p.x, p.y, props.mapTransformProps);
Expand Down
4 changes: 2 additions & 2 deletions frontend/farm_designer/map/layers/images/map_image.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";
import { TaggedImage } from "farmbot";
import { CameraCalibrationData, BotOriginQuadrant } from "../../../interfaces";
import { MapTransformProps } from "../../interfaces";
Expand Down Expand Up @@ -288,7 +288,7 @@ export class MapImage extends React.Component<MapImageProps, MapImageState> {
}
}

export interface MapImagePositionDataProps {
interface MapImagePositionDataProps {
x: number | undefined;
y: number | undefined;
width: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export enum InterpolationKey {
opts = "interpolationOpts",
}

export enum MoistureInterpolationKey {
enum MoistureInterpolationKey {
data = "interpolationDataMoisture",
hash = "interpolationHashMoisture",
}
Expand Down Expand Up @@ -68,14 +68,14 @@ interface GenerateInterpolationMapDataProps {
options: InterpolationOptions;
}

export interface PointObject {
interface PointObject {
uuid: string;
x: number;
y: number;
value: number;
}

export const convertToPointObject =
const convertToPointObject =
(point: TaggedPoint | TaggedSensorReading): PointObject | undefined =>
!isUndefined(point.body.x) && !isUndefined(point.body.y)
? ({
Expand Down Expand Up @@ -167,7 +167,7 @@ export const InterpolationMap = (props: InterpolationMapProps) => {
</g>;
};

export interface InterpolationSettingsProps {
interface InterpolationSettingsProps {
dispatch: Function;
farmwareEnvs: TaggedFarmwareEnv[];
saveFarmwareEnv: SaveFarmwareEnv;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function SensorReadingsLayer(props: SensorReadingsLayerProps) {
</g>;
}

export const getMoistureColor = (value: number) => {
const getMoistureColor = (value: number) => {
const normalizedValue = round(255 * value / 1024);
if (value > 900) { return "rgb(255, 255, 255)"; }
return `rgb(0, 0, ${normalizedValue})`;
Expand Down
2 changes: 1 addition & 1 deletion frontend/farm_designer/map/profile/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { TaggedToolSlotPointer } from "farmbot";
import { CustomToolProfile } from "../../../tools/custom_tool_graphics";
import { FilePath } from "../../../internal_urls";

export enum UTMDimensions {
enum UTMDimensions {
height = 40,
extrusion = 20,
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/farm_designer/map/tool_graphics/seed_trough.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const GantryToolSlot = (props: GantryToolSlotGraphicProps) => {
</g>;
};

export const seedTroughGradient =
const seedTroughGradient =
<linearGradient id="SeedTroughGradient" gradientTransform="rotate(90)">
<stop offset="0%" stopColor={Color.black} stopOpacity={0.1} />
<stop offset="66%" stopColor={Color.black} stopOpacity={0.75} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/farm_designer/map/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const leftOrTop: Record<"x" | "y", "top" | "left"> = { x: "left", y: "top" };

type XYCoordinate = { x: number, y: number };

export interface ScreenToGardenParams {
interface ScreenToGardenParams {
page: XYCoordinate;
scroll: { left: number, top: number };
zoomLvl: number;
Expand Down
10 changes: 5 additions & 5 deletions frontend/farm_events/edit_fe_form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface FarmEventViewModel {
body?: ParameterApplication[];
}

export type FarmEventViewModelKey = keyof FarmEventViewModel;
type FarmEventViewModelKey = keyof FarmEventViewModel;

/** Breaks up a TaggedFarmEvent into a structure that can easily be used
* by the edit form.
Expand Down Expand Up @@ -148,7 +148,7 @@ export interface EditFEProps {
resources: ResourceIndex;
}

export interface EditFEFormState {
interface EditFEFormState {
/**
* Hold a partial FarmEvent locally containing only updates made by the form.
*/
Expand Down Expand Up @@ -482,7 +482,7 @@ export const RepeatForm = (props: RepeatFormProps) => {
</div>;
};

export const dateCheck = (
const dateCheck = (
fieldGet: (key: FarmEventViewModelKey) => string,
): string | undefined => {
const startDate = fieldGet("startDate");
Expand All @@ -492,7 +492,7 @@ export const dateCheck = (
}
};

export const timeCheck = (
const timeCheck = (
fieldGet: (key: FarmEventViewModelKey) => string,
timeSettings: TimeSettings,
): string | undefined => {
Expand Down Expand Up @@ -525,7 +525,7 @@ export const FarmEventDeleteButton = (props: FarmEventDeleteButtonProps) =>
{t("Delete")}
</button>;

export interface FarmEventFormProps {
interface FarmEventFormProps {
isRegimen: boolean;
fieldGet(key: FarmEventViewModelKey): string;
fieldSet(key: FarmEventViewModelKey, value: string): void;
Expand Down
4 changes: 2 additions & 2 deletions frontend/farm_events/map_state_to_props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const nextRegItemTimes =
&& time.isSameOrAfter(moment(startTime)));
};

export const regimenCalendarAdder = (
const regimenCalendarAdder = (
index: ResourceIndex, timeSettings: TimeSettings) =>
(f: FarmEventWithRegimen, c: Calendar, now = moment()) => {
const { regimen_items } = f.executable;
Expand Down Expand Up @@ -96,7 +96,7 @@ export const regimenCalendarAdder = (
}
};

export const addSequenceToCalendar =
const addSequenceToCalendar =
(f: FarmEventWithSequence, c: Calendar, timeSettings: TimeSettings,
ri: ResourceIndex,
now = moment()) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/help/support.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const SupportPanel = () =>
</DesignerPanelContent>
</DesignerPanel>;

export interface FeedbackProps {
interface FeedbackProps {
stepSlug?: WizardStepSlug;
keep?: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/open_farm/cached_crop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isObject, isUndefined } from "lodash";
import { OFCropAttrs, OFCropResponse, svgToUrl } from "./icons";
import { ExternalUrl } from "../external_urls";

export type OFIcon = Readonly<OFCropAttrs>;
type OFIcon = Readonly<OFCropAttrs>;
type IconDictionary = Dictionary<OFIcon | undefined>;

const STORAGE_KEY = "openfarm_icons_with_spread";
Expand Down
2 changes: 1 addition & 1 deletion frontend/open_farm/icons.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FilePath } from "../internal_urls";

export const DATA_URI = "data:image/svg+xml;utf8,";
const DATA_URI = "data:image/svg+xml;utf8,";

export interface OFCropAttrs {
svg_icon?: string | undefined;
Expand Down
16 changes: 8 additions & 8 deletions frontend/open_farm/openfarm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export namespace OpenFarm {
svg_icon?: string | undefined;
}

export interface Self {
interface Self {
api: string;
website: string;
}
Expand All @@ -37,11 +37,11 @@ export namespace OpenFarm {
self: Self;
}

export interface Links2 {
interface Links2 {
related: string;
}

export interface Datum2 {
interface Datum2 {
type: string;
id: string;
}
Expand All @@ -50,12 +50,12 @@ export namespace OpenFarm {
links: Links2;
}

export interface Pictures {
interface Pictures {
links: Links2;
data: Datum2[];
}

export interface Relationships {
interface Relationships {
companions: Companions;
pictures: Pictures;
}
Expand All @@ -68,7 +68,7 @@ export namespace OpenFarm {
relationships: Relationships;
}

export interface ImageAttrs {
interface ImageAttrs {
id: string;
image_url: string;
small_url: string;
Expand All @@ -78,13 +78,13 @@ export namespace OpenFarm {
canopy_url: string;
}

export interface IncludedPictures {
interface IncludedPictures {
id: string;
type: "crops-pictures";
attributes: ImageAttrs;
}

export interface IncludedCompanion {
interface IncludedCompanion {
id: string;
type: "crops";
attributes: OFCrop;
Expand Down
2 changes: 1 addition & 1 deletion frontend/os_download/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ interface OsDownloadWizardProps {
setWizard(value: boolean): void;
}

export class OsDownloadWizard
class OsDownloadWizard
extends React.Component<OsDownloadWizardProps, OsDownloadWizardState> {
state: OsDownloadWizardState = {
model: undefined,
Expand Down
2 changes: 1 addition & 1 deletion frontend/photos/image_workspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const RANGES = {
};

/** Number values that the <ImageWorkspace/> panel deals with. */
export interface NumericValues {
interface NumericValues {
iteration: number;
morph: number;
blur: number;
Expand Down
2 changes: 1 addition & 1 deletion frontend/photos/remote_env/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export type CAMERA_CALIBRATION_KEY_PART =
export const EVERY_WD_KEY: WDENVKey[] =
Object.keys(WD_KEY_DEFAULTS).map((x: WDENVKey) => x);

export const isWDENVKey = (key: unknown): key is WDENVKey =>
const isWDENVKey = (key: unknown): key is WDENVKey =>
(EVERY_WD_KEY as string[]).includes("" + key);

export const namespace = <T>(
Expand Down
Loading

0 comments on commit a5cfa75

Please sign in to comment.