-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inline DefineMap.extend as a property (#153)
* Fix inline DefineMap.extend as a property * Separate export handling from property * Handle parentPath value if undefined * Use class expression
- Loading branch information
1 parent
dfdb40e
commit 587bec8
Showing
7 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/templates/can-observable-object/observable-object-inline-input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const TodosList = DefineList.extend({ | ||
"#": DefineMap.extend({ | ||
id: "number", | ||
name: "string" | ||
}) | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/templates/can-observable-object/observable-object-inline-output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const TodosList = DefineList.extend({ | ||
"#": class extends ObservableObject { | ||
static get props() { | ||
return { | ||
id: "number", | ||
name: "string" | ||
}; | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/fixtures/version-6/can-observable-object/observable-object-inline-input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const TodosList = DefineList.extend({ | ||
"#": DefineMap.extend({ | ||
id: "number", | ||
name: "string" | ||
}) | ||
}); |
10 changes: 10 additions & 0 deletions
10
test/fixtures/version-6/can-observable-object/observable-object-inline-output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const TodosList = DefineList.extend({ | ||
"#": class extends ObservableObject { | ||
static get props() { | ||
return { | ||
id: "number", | ||
name: "string" | ||
}; | ||
} | ||
} | ||
}); |