Skip to content

Commit 43f8f8e

Browse files
MichaelDeBoeyCompuIves
authored andcommitted
Type getSandboxName better (codesandbox#2969)
1 parent 01fe235 commit 43f8f8e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
export const getSandboxName = (sandbox: {
2-
title: string;
3-
alias: string;
4-
id: string;
5-
}) => sandbox.title || sandbox.alias || sandbox.id;
1+
import { Sandbox } from '../types';
2+
3+
export const getSandboxName = ({
4+
alias,
5+
id,
6+
title,
7+
}: Pick<Sandbox, 'alias' | 'id' | 'title'>) => title || alias || id;

0 commit comments

Comments
 (0)