# mod.ts
export type MappedTypeWithNewProperties<Type> = {
  readonly [Properties in keyof Type as NewKeyType]?: Type[Properties];
};

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:1:1
  | 
1 | export type MappedTypeWithNewProperties<Type> = {
  | ^

# output.txt
Defined in file:///mod.ts:0:1

type MappedTypeWithNewProperties<Type> = readonly [Properties in keyof Type as NewKeyType]?: Type[Properties]


# output.json
{
  "symbols": [
    {
      "name": "MappedTypeWithNewProperties",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 0,
            "col": 0,
            "byteIndex": 0
          },
          "declarationKind": "export",
          "kind": "typeAlias",
          "def": {
            "tsType": {
              "kind": "mapped",
              "value": {
                "readonly": true,
                "typeParam": {
                  "name": "Properties",
                  "constraint": {
                    "kind": "typeOperator",
                    "value": {
                      "operator": "keyof",
                      "tsType": {
                        "repr": "Type",
                        "kind": "typeRef",
                        "value": {
                          "typeName": "Type",
                          "resolution": {
                            "kind": "typeParam",
                            "declaringName": "MappedTypeWithNewProperties",
                            "declaringKind": "typeAlias"
                          }
                        }
                      }
                    }
                  }
                },
                "nameType": {
                  "repr": "NewKeyType",
                  "kind": "typeRef",
                  "value": {
                    "typeName": "NewKeyType"
                  }
                },
                "optional": true,
                "tsType": {
                  "kind": "indexedAccess",
                  "value": {
                    "objType": {
                      "repr": "Type",
                      "kind": "typeRef",
                      "value": {
                        "typeName": "Type",
                        "resolution": {
                          "kind": "typeParam",
                          "declaringName": "MappedTypeWithNewProperties",
                          "declaringKind": "typeAlias"
                        }
                      }
                    },
                    "indexType": {
                      "repr": "Properties",
                      "kind": "typeRef",
                      "value": {
                        "typeName": "Properties",
                        "resolution": {
                          "kind": "typeParam"
                        }
                      }
                    }
                  }
                }
              }
            },
            "typeParams": [
              {
                "name": "Type"
              }
            ]
          }
        }
      ]
    }
  ]
}
