Fixed building process

canary
WolverinDEV 2018-12-23 22:56:04 +01:00
parent c61fe1ca47
commit ba66c91729
5 changed files with 37 additions and 9 deletions

View File

@ -29,7 +29,7 @@ namespace bookmarks {
}
export interface Bookmark {
type: BookmarkType.ENTRY;
type: /* BookmarkType.ENTRY */ BookmarkType;
/* readonly directory: DirectoryBookmark; */
server_properties: ServerProperties;
@ -44,7 +44,7 @@ namespace bookmarks {
}
export interface DirectoryBookmark {
type: BookmarkType.DIRECTORY;
type: /* BookmarkType.DIRECTORY */ BookmarkType;
readonly content: (Bookmark | DirectoryBookmark)[];
unique_id: string;
@ -93,7 +93,7 @@ namespace bookmarks {
if(entry.unique_id == uuid)
return entry;
if(entry.type == BookmarkType.DIRECTORY) {
const result = find_bookmark_recursive(entry, uuid);
const result = find_bookmark_recursive(entry as DirectoryBookmark, uuid);
if(result) return result;
}
}
@ -147,7 +147,7 @@ namespace bookmarks {
else
for(const entry of parent.content)
if(entry.type == BookmarkType.DIRECTORY)
delete_bookmark_recursive(entry, bookmark)
delete_bookmark_recursive(entry as DirectoryBookmark, bookmark)
}
export function delete_bookmark(bookmark: Bookmark | DirectoryBookmark) {

View File

@ -21,9 +21,9 @@ const js_render = window.jsrender || $;
const native_client = window.require !== undefined;
function getUserMediaFunction() {
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)
return (settings, success, fail) => { navigator.mediaDevices.getUserMedia(settings).then(success).catch(fail); };
return navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
if((navigator as any).mediaDevices && (navigator as any).mediaDevices.getUserMedia)
return (settings, success, fail) => { (navigator as any).mediaDevices.getUserMedia(settings).then(success).catch(fail); };
return (navigator as any).getUserMedia || (navigator as any).webkitGetUserMedia || (navigator as any).mozGetUserMedia;
}
function setup_close() {

View File

@ -321,11 +321,30 @@ generators[SyntaxKind.ClassDeclaration] = (settings, stack, node: ts.ClassDeclar
return ts.createClassDeclaration(node.decorators, append_export(append_declare(node.modifiers, !stack.flag_declare), stack.flag_namespace), node.name, node.typeParameters, node.heritageClauses, members as any);
};
generators[SyntaxKind.PropertySignature] = (settings, stack, node: ts.PropertySignature) => {
console.log(SyntaxKind[node.type.kind]);
let type: ts.TypeNode = node.type;
switch (node.type.kind) {
case SyntaxKind.LiteralType:
type = ts.createIdentifier("any") as any;
}
return ts.createPropertySignature(node.modifiers, node.name, node.questionToken, type, undefined);
};
generators[SyntaxKind.InterfaceDeclaration] = (settings, stack, node: ts.InterfaceDeclaration) => {
if(settings.remove_private.field && has_private(node.modifiers)) return;
if(stack.flag_namespace && !has_modifier(node.modifiers, SyntaxKind.ExportKeyword)) return;
return node;
const members: any[] = [];
for(const member of node.members) {
if(generators[member.kind])
members.push(generators[member.kind](settings, stack, member));
else
members.push(member);
}
return ts.createInterfaceDeclaration(undefined, append_export(append_declare(node.modifiers, !stack.flag_declare), stack.flag_namespace), node.name, node.typeParameters, node.heritageClauses, members);
};
generators[SyntaxKind.VariableDeclaration] = (settings, stack, node: ts.VariableDeclaration) => {

View File

@ -0,0 +1,9 @@
enum YY {
H = "C",
B = "Y"
}
interface X {
type: "",
c: YY.B
}

2
vendor/bbcode vendored

@ -1 +1 @@
Subproject commit 032446b477a5fec8cccc6c3632a0bcbf521b9c0f
Subproject commit a48cdd857059ff7640c93fa4f0e226739943e4d9