@@ -2,8 +2,8 @@ import { ResolvableLocationValue } from "../common/bqrs-cli-types";
22import { ModeledMethod , ModeledMethodType } from "./modeled-method" ;
33
44export type Call = {
5- label : string ;
6- url : ResolvableLocationValue ;
5+ readonly label : string ;
6+ readonly url : Readonly < ResolvableLocationValue > ;
77} ;
88
99export enum CallClassification {
@@ -14,48 +14,48 @@ export enum CallClassification {
1414}
1515
1616export type Usage = Call & {
17- classification : CallClassification ;
17+ readonly classification : CallClassification ;
1818} ;
1919
2020export interface MethodSignature {
2121 /**
2222 * Contains the version of the library if it can be determined by CodeQL, e.g. `4.2.2.2`
2323 */
24- libraryVersion ?: string ;
24+ readonly libraryVersion ?: string ;
2525 /**
2626 * A unique signature that can be used to identify this external API usage.
2727 *
2828 * The signature contains the package name, type name, method name, and method parameters
2929 * in the form "packageName.typeName#methodName(methodParameters)".
3030 * e.g. `org.sql2o.Connection#createQuery(String)`
3131 */
32- signature : string ;
32+ readonly signature : string ;
3333 /**
3434 * The package name in Java, or the namespace in C#, e.g. `org.sql2o` or `System.Net.Http.Headers`.
3535 *
3636 * If the class is not in a package, the value should be an empty string.
3737 */
38- packageName : string ;
39- typeName : string ;
40- methodName : string ;
38+ readonly packageName : string ;
39+ readonly typeName : string ;
40+ readonly methodName : string ;
4141 /**
4242 * The method parameters, including enclosing parentheses, e.g. `(String, String)`
4343 */
44- methodParameters : string ;
44+ readonly methodParameters : string ;
4545}
4646
4747export interface Method extends MethodSignature {
4848 /**
4949 * Contains the name of the library containing the method declaration, e.g. `sql2o-1.6.0.jar` or `System.Runtime.dll`
5050 */
51- library : string ;
51+ readonly library : string ;
5252 /**
5353 * Is this method already supported by CodeQL standard libraries.
5454 * If so, there is no need for the user to model it themselves.
5555 */
56- supported : boolean ;
57- supportedType : ModeledMethodType ;
58- usages : Usage [ ] ;
56+ readonly supported : boolean ;
57+ readonly supportedType : ModeledMethodType ;
58+ readonly usages : readonly Usage [ ] ;
5959}
6060
6161export function getArgumentsList ( methodParameters : string ) : string [ ] {
@@ -68,7 +68,7 @@ export function getArgumentsList(methodParameters: string): string[] {
6868
6969export function canMethodBeModeled (
7070 method : Method ,
71- modeledMethods : ModeledMethod [ ] ,
71+ modeledMethods : readonly ModeledMethod [ ] ,
7272 methodIsUnsaved : boolean ,
7373) : boolean {
7474 return (
0 commit comments