Skip to content

Getting started 2D and 3D tutorials are missing type hints that are automatically generated #11037

Open
@raulcd

Description

@raulcd

Your Godot version:

4.4.1

Issue description:

When working on the tutorial I found that in general all default generated functions contains type hints example:
func _ready() -> void:, func _on_mob_timer_timeout() -> void:

From my understanding we want to encourage the use of type hints to users. I think the tutorials should at least match what the default generated scripts on the editor are going to be.

The two above examples currently are shown on the tutorial as:
func _ready(): or func _on_mob_timer_timeout() which could even encourage the user to remove the type hints.

I am happy to provide a PR for the getting started first 2d and 3d games adding type hints if you think it would be an improvement.

I see there were discussions on the past about adding type hints to the documentation (#6295) but I think the getting started guides should at least match what the users are going to find with the autogenerated functions as this is probably the entry point and might be confusing for some.

URL to the documentation page (if already existing):

Several pages on the getting started guide.
https://docs.godotengine.org/en/stable/getting_started/first_2d_game/03.coding_the_player.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions