public string ConvertToTypeScript(string fileName, FileNameConversionOptions options) { var convertedName = Path.GetFileNameWithoutExtension(fileName); convertedName = convertedName.HasInterfacePrefix() ? convertedName.RemoveInterfacePrefix() : convertedName; convertedName = options.UseKebabCase ? convertedName.ToKebabCase() : convertedName.ToCamelCase(); convertedName = options.AppendModelSuffix ? convertedName + ".model" : convertedName; convertedName += ".ts"; return(convertedName); }
private string GetOutputFilePath(string input, string output, FileNameConversionOptions options) => !input.EndsWithFileExtension() ? throw new ArgumentException()