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

Non-nullable type for all environment #4

Open
MisterAssm opened this issue Sep 2, 2022 · 0 comments
Open

Non-nullable type for all environment #4

MisterAssm opened this issue Sep 2, 2022 · 0 comments
Assignees
Labels
breaking contient une modification incompatible avec les versions antérieurs enhancement New feature or request
Milestone

Comments

@MisterAssm
Copy link
Owner

MisterAssm commented Sep 2, 2022

Passer tous les Nullable type non null.

Vue d'ensemble

Passage de toutes les fonctions / variable à risque null vers kotlin-stdlib/Result

Exemple - sans opérateur elvis pour une compréhension globale

Actuellement : vérifier si un type est null

val gender = 3.asPronoteGender() // TEACHER_GENDER

if (gender == null) {
    println("Genre non identifié")
} else {
   println("Type du json retourné = ${gender}")
}

Passage à kotlin-stdlib/Result

val gender = 3.asPronoteGender() // TEACHER_GENDER

gender.onSuccess { println("Type du json retourné = ${gender}") }
      .onFailure { println("Genre non identifié") }
@MisterAssm MisterAssm added enhancement New feature or request breaking contient une modification incompatible avec les versions antérieurs labels Sep 2, 2022
@MisterAssm MisterAssm added this to the 1.0.0 milestone Sep 2, 2022
@MisterAssm MisterAssm self-assigned this Sep 2, 2022
@MisterAssm MisterAssm moved this to 📋 Planned in Kronote project Sep 2, 2022
@MisterAssm MisterAssm moved this from 📋 Planned to 🏗 In progress in Kronote project Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking contient une modification incompatible avec les versions antérieurs enhancement New feature or request
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant