Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow VueOptions.el to be a DOM element or String #10

Merged
merged 1 commit into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jsweet.candies</groupId>
<artifactId>vuejs</artifactId>
<version>2.5.21-12</version>
<version>2.5.21-13</version>
<properties>
<jsweet.transpiler.version>2.0.0</jsweet.transpiler.version>
</properties>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/def/vuejs/VueOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Map;
import java.util.function.Supplier;

import def.dom.Element;
import def.js.Array;
import jsweet.lang.Interface;
import jsweet.lang.Optional;
Expand Down Expand Up @@ -34,7 +35,7 @@ public class VueOptions {
// DOM, see https://vuejs.org/v2/api/#Options-DOM

@Optional
public String el;
public Union<String, Element> el;

@Optional
public String template;
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/META-INF/resources/typings/vuejs/bundle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface VueOptions {

watch? : any;

el? : string;
el? : ((string)|(Element));

template? : string;

Expand Down Expand Up @@ -53,6 +53,10 @@ interface VueOptions {
mixins? : Array<any>;
}

interface Prop {
required : boolean;
}

declare class Vue<DataClass> {
public $data : DataClass;

Expand Down Expand Up @@ -87,8 +91,4 @@ declare class Vue<DataClass> {
public static filter(id : string, __function : Function) : string;
}

interface Prop {
required : boolean;
}