mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
- mock fiddle for offline testing - redesigned to support files closing - support for deleted files
12 lines
364 B
TypeScript
12 lines
364 B
TypeScript
export class FiddleConfiguration {
|
|
readonly slug: string;
|
|
readonly version: number;
|
|
}
|
|
|
|
export function parseFiddleId(id: string): FiddleConfiguration {
|
|
let idFragments = id.split('/');
|
|
let fiddleSlug = idFragments[0];
|
|
let fiddleVersion = idFragments.length > 1 ? parseInt(id.split('/')[1]) : undefined;
|
|
|
|
return { slug: fiddleSlug, version: fiddleVersion };
|
|
} |