Skip to content

Commit

Permalink
Merge branch 'develop' into 2408-support-style-for-class
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreywolf authored Dec 11, 2023
2 parents 70b4a37 + 6e64556 commit a71bdbd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.9'
services:
mermaid:
image: node:18.18.2-alpine3.18
image: node:18.19.0-alpine3.18
stdin_open: true
tty: true
working_dir: /mermaid
Expand Down
4 changes: 2 additions & 2 deletions docs/syntax/classDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ class BankAccount{

#### Generic Types

Members can be defined using generic types, such as `List<int>`, for fields, parameters, and return types by enclosing the type within `~` (**tilde**). **Nested** type declarations such as `List<List<int>>` are supported.
Generics can be representated as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List<List<int>>` are supported, though generics that include a comma are currently not supported. (such as `List<List<K, V>>`)

Generics can be represented as part of a class definition and also in the parameters or the return value of a method/function (note that any references to the class later in diagram code is used without the type )
> _note_ when a generic is used within a class definition, the generic type is NOT considered part of the class name. i.e.: for any syntax which required you to reference the class name, you need to drop the type part of the definition. This also means that mermaid does not currently support having two classes with the same name, but different generic types.
```mermaid-example
classDiagram
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "10.2.4",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"type": "module",
"packageManager": "pnpm@8.11.0",
"packageManager": "pnpm@8.12.0",
"keywords": [
"diagram",
"markdown",
Expand Down Expand Up @@ -123,7 +123,7 @@
"vitest": "^0.34.0"
},
"volta": {
"node": "18.18.2"
"node": "18.19.0"
},
"nyc": {
"report-dir": "coverage/cypress"
Expand Down
4 changes: 2 additions & 2 deletions packages/mermaid/src/docs/syntax/classDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ class BankAccount{

#### Generic Types

Members can be defined using generic types, such as `List<int>`, for fields, parameters, and return types by enclosing the type within `~` (**tilde**). **Nested** type declarations such as `List<List<int>>` are supported.
Generics can be representated as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List<List<int>>` are supported, though generics that include a comma are currently not supported. (such as `List<List<K, V>>`)

Generics can be represented as part of a class definition and also in the parameters or the return value of a method/function (note that any references to the class later in diagram code is used without the type )
> _note_ when a generic is used within a class definition, the generic type is NOT considered part of the class name. i.e.: for any syntax which required you to reference the class name, you need to drop the type part of the definition. This also means that mermaid does not currently support having two classes with the same name, but different generic types.
```mermaid-example
classDiagram
Expand Down

0 comments on commit a71bdbd

Please sign in to comment.