Skip to content

Commit 29eeade

Browse files
[StimulusBundle] Added docs about Typescript controller usage
1 parent 3724401 commit 29eeade

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/StimulusBundle/doc/index.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ necessary files. If not, or you're curious, see :ref:`Manual Setup <manual-insta
4444
Usage
4545
-----
4646

47-
You can now create custom Stimulus controllers inside of the ``assets/controllers.``
47+
You can now create custom Stimulus controllers inside of the ``assets/controllers``
4848
directory. In fact, you should have an example controller there already: ``hello_controller.js``:
4949

5050
.. code-block:: javascript
@@ -71,6 +71,13 @@ will activate.
7171
There's a *lot* more to learn about Stimulus. See the `Stimulus Documentation`_
7272
for all the goodies.
7373

74+
TypeScript Controllers
75+
~~~~~~~~~~~~~~~~~~~~~~~~~
76+
77+
If you want to use `TypeScript`_ to define your controllers, you can! You only need to install and setup the
78+
`sensiolabs/typescript-bundle`_. Make sure to add the ``assets/controllers`` path to the `sensiolabs_typescript.source_dir`
79+
configuration, create your controller in that directory and you're good to go.
80+
7481
.. _ux-packages:
7582

7683
The UX Packages
@@ -541,3 +548,5 @@ it will normalize it:
541548
.. _`Vue`: https://vuejs.org/
542549
.. _`stimulus-use`: https://stimulus-use.github.io/stimulus-use
543550
.. _`stimulus-components`: https://stimulus-components.netlify.app/
551+
.. _`TypeScript`: https://www.typescriptlang.org/
552+
.. _`sensiolabs/typescript-bundle`: https://github.com/sensiolabs/AssetMapperTypeScriptBundle

0 commit comments

Comments
 (0)