Skip to content

Latest commit

 

History

History

deep-camel-case-properties

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

DeepCamelCaseProperties<Type> constructs a type by picking all properties from type Type recursively and converting all of them to camel case

type Config = {
  ONEWORD: false;
  many_words: {
    two_words: true;
    "HERE-THREE-WORDS": false;
  };
};

type Example = DeepCamelCaseProperties<Config>;
//   ^? { oneword: false; manyWords: { twoWords: true; hereThreeWords: false } }

It supports:

  • Object types

TS Playground – https://tsplay.dev/wXOM8W